The study was to compare the effectiveness of different epidermal growth factor receptor—tyrosine kinase inhibitors (EGFR-TKIs) in patients with advanced non-small-cell lung cancer (NSCLC) and received EGFR-TKIs as first-line therapy. This retrospective cohort study was conducted using data from real-world settings. Patients with stage IIIB and IV NSCLC and first received gefitinib, erlotinib, or afatinib between 2011 and 2015 were included. The date of the first claim for EGFR-TKIs was set as the index date. Study endpoints were all-cause death and treatment failure that was defined when patients added on or switched to chemotherapy or terminal care. A total of 5,940 patients, including 3,982 (67.0%) receiving gefitinib, 1,207 (20.3%) receiving erlotinib, and 751 (12.7%) receiving afatinib, were eligible for this study. The 1-year overall survival (OS) rates for gefitinib, erlotinib, and afatinib groups were 74% (95% confidence interval [CI]: 72–75%), 75% (95% CI: 73–77%), and 80% (95% CI: 77–83%), respectively. Compared to gefitinib, afatinib was associated with a lower risk of all-cause death (adjusted hazard ratio [aHR] = 0.82, 95% CI: 0.72–0.93) but not erlotinib (aHR = 0.95, 95% CI: 0.86–1.05). Similar results were also found regarding the effectiveness of treatment. All the three EGFR-TKIs showed no differences for both outcomes among patients with an Eastern Cooperative Oncology Group Performance Score of 2. The real-world data exhibited afatinib was more likely to be used for younger patients in a better condition than other EGFR inhibitors, and observed prolonged OS and treatment effectiveness compared to gefitinib after performing a multivariate Cox regression analysis.