Lung cancer survivors are at risk of developing second primary cancers (SPCs). Although some risk factors for the development of SPCs have been addressed, their impacts have not been clarified. This study, based on Taiwan’s National Health Insurance Research Database (NHIRD), a nationwide database, was designed to investigate the risk factors for SPCs in patients with initial lung cancer and identify the impacts of epidermal growth factor receptor (EGFR) tyrosine kinase inhibitor (TKI) treatment on the development of SPCs. In this study, 37,954 individuals were included, of whom 2819 had SPCs. These patients were further divided into the second primary lung cancers (SPLC) and second primary extrapulmonary cancer (SPEC) groups. Among the patients with lung cancer without SPCs, those aged <65 years accounted for 53.15%. Patients aged ≥65 years accounted for 40.18% and 53.24% in the SPLC and SPEC groups, respectively. Females accounted for 50.3% of patients without SPC, 54% of the SPLC group, and 44.3% of the SPEC group. Univariate and multivariate Cox proportional hazard models showed increased hazard ratios for smoking, hypertension, and diabetes mellitus, and lower HRs for surgery, chemotherapy, radiotherapy, and TKIs. Patients undergoing surgery, chemotherapy, and radiotherapy were associated with a lower risk of SPCs. Treatment with EGFR TKIs was a significant and independent factor associated with lower incidence of SPCs. This study may encourage researchers to establish predictive models based on our results to assess the risk factors for SPCs, and therefore, early screening and intervention could be applied, and the SPCs-related mortality and relevant medical costs could be reduced.