Immune checkpoint inhibitors (ICIs) have improved lung cancer treatment but are associated with immune-related adverse events (irAEs). This study analyzes the relationship between irAEs and treatment effectiveness in advanced non-small cell lung cancer (NSCLC) patients. We conducted a retrospective study of NSCLC patients treated with ICIs from March 2019 to October 2022 at Zhongshan Hospital (Xiamen). Patients were divided into irAE and non-irAE groups, and treatment outcomes were compared. A total of 154 patients were included, with 36.4% in the irAE group and 63.6% in the non-irAE group. Most irAEs were Grade 1-2 (86.4%), with 13.6% being Grade 3 or higher. The irAE group had higher disease control rates (DCR: 94.6% vs. 76.5%, P = 0.004) and objective response rates (ORR: 42.9% vs. 26.5%, P = 0.037). Median progression-free survival (PFS) was longer in the irAE group (18 vs. 9months, HR: 0.53, P = 0.001), as was overall survival (OS: 39.5 vs. 16months, HR: 0.46, P = 0.001). Landmark analysis at 6 and 12weeks confirmed that irAEs were associated with improved outcomes. Moreover, patients who experienced two or more adverse events during treatment had significantly longer OS compared to those who had only one or no adverse events (41.6months vs. 34.0 vs. 23.6, P = 0.003). Patients with irAEs demonstrated better outcomes, including ORR, DCR, PFS, and OS. Further studies on biomarkers and irAE incidence are warranted to improve lung cancer management.