Epidermal growth factor receptor (EGFR) mutation is the most frequently encountered oncogenic driver in lung cancer. Risk factors for EGFR mutation may help prevention, surveillance and diagnosis strategies of EGFR-mutated lung cancer.A nationwide, retrospective, longitudinal, cohort study was performed between January 2002 and December 2015. Patient data were collected from the Korean National Health Insurance Database. The lung cancer group included EGFR tyrosine kinase inhibitor (TKI)-treated patients. Controls were randomly selected from people without a history of lung cancer and determined to be four times the number of patients with EGFR-mutated advanced lung cancer. The risk model of developing EGFR-mutated lung cancer was constructed by multiple logistic regression analysis.Among the 2010 new cases of lung cancer treated in 2010-2015, 214 cases were classified as EGFR-mutated advanced lung cancer. The risk of developing EGFR-mutated advanced lung cancer was higher in patients in their 50s (odds ratio [OR]: 3.42; 95% confidence interval [CI]: 1.68-6.93), 60s (OR: 7.04; 95% CI: 3.35-14.77) and 70s (OR: 10.27; 95% CI: 4.73-22.30) and in those aged >80 years (OR: 5.98; 95% CI: 2.25-15.92) than those in their 40s. The risk of developing EGFR-mutated lung cancer was also higher in hospitalised patients with a history of pneumonia (OR: 5.22; 95% CI: 1.88-14.46) and those with gastroesophageal reflux disease (OR: 2.02; 95% CI: 1.32-3.07).Patients with EGFR-mutated advanced lung cancer were associated with ageing, history of being hospitalised for pneumonia and gastroesophageal reflux disease.