Immune checkpoint inhibitors (ICIs) have been approved to treat patients with various cancer types, including lung cancer, in many countries. This study aims to investigate the effectiveness and safety of ICIs under different treatment conditions of non-small cell lung cancer patients. A population-based retrospective cohort study was conducted using the electronic health records of three medical centers in Taiwan. From January 01, 2016, to November 30, 2018, a total of 91 ICIs and 300 traditional chemotherapy users who had undergone stage III and IV lung cancer treatment were included in the study. We performed the randomized matched pair design by selecting a Chemotherapy subject for each ICI patient in the sample population. All subjects were monitored from the date of taking ICIs or chemotherapy drugs until the event of death, loss to follow-up, or were occurred with any defined adverse events. Kaplan-Meier estimators and cox proportional hazard regression models were used to compute the overall survival, efficacy, and safety of the ICIs group. The median overall survival (OS) in the ICI and Chemo groups after matching was 11.2 months and 10.5 months, respectively. However, the results showed no significant OS differences between ICIs and chemo groups for both before and after matching (HR,1.30; 95%CI, 0.68-2.46; p=0.428 before matching and HR,0.96; 95CI%, 0.64-1.44; p=0.838 after matching). We observed that with the higher amount of PD-L1, the length of the patients’ overall survival was (positive vs. negative PD-L1, HR,0.21; 95%CI, 0.05-0.80; p=0.022). The incidences of serious adverse drug events above grade 3 in the ICIs and traditional chemo groups were 12.7% and 21.5%, respectively. We also found that the number of AEs was less in ICIs than in the Chemo group, and the AEs that occurred after treatments were observed earlier in the ICIs compared to the Chemo group. ICIs drugs were observed to be safer than traditional chemotherapy as they had a lower risk of serious adverse drug events. It is necessary to pay attention to immune-related side effects and provide appropriate treatment. Furthermore, the patient’s physical status and PD-L1 test can be used to evaluate the clinical effectiveness of ICIs.