ImportanceEpidermal growth factor receptor inhibitors (EGFRis) have been reported to be associated with cutaneous and ocular side effects; however, there is limited evidence of an association between EGFRi treatment and keratitis.ObjectiveTo determine the association between EGFRi treatment and agents and the risk of new-onset keratitis among patients with lung cancer.Design, Setting, and ParticipantsThis US population–based cohort study examined TriNetX data of patients with lung cancer treated with or without EGFRis between May 1, 2003, and October 30, 2023.ExposuresTreatment with EGFRis, including the first-generation agents gefitinib and erlotinib, the second-generation agent afatinib, and the third-generation agent osimertinib.Main Outcomes and MeasuresThe risk of new-onset keratitis among patients with lung cancer receiving EGFRi treatment was determined using logistic and Cox proportional hazards regression.ResultsAmong 1 388 108 patients with lung cancer, 22 225 received EGFRis (mean [SD] age, 69.7 [10.6] years; 62.8% females and 37.2% males). Patients treated with EGFRis had a higher risk of keratitis than nonexposed patients (hazard ratio [HR], 1.520; 95% CI, 1.339-1.725). Subtypes of EGFRi-associated keratitis included keratoconjunctivitis (HR, 1.367; 95% CI, 1.158-1.615), superficial keratitis (HR, 1.635; 95% CI, 1.306-2.047), and corneal ulcer (HR, 2.132; 95% CI, 1.515-3.002). Patients taking afatinib had a higher risk of keratitis (HR, 2.229; 95% CI, 1.480-3.356).Conclusions and RelevanceThese findings suggest that patients with lung cancer treated with EGFRis may have an increased risk of new-onset keratitis, especially with the second-generation EGFRi afatinib, supporting the need for prompt diagnosis and management of EGFRi-associated ocular issues to prevent serious complications or treatment disruptions.