ObjectiveTo find out how bacterial lung infections (BLI) affect the effectiveness of therapy and the rate of pneumonia caused by pneumonia related to checkpoint inhibitors (CIP) in patients with non-small cell lung cancer (NSCLC) who are getting immunotherapy with checkpoint inhibitors (ICIs).Patients and methods507 NSCLC patients who received at least two ICI treatments between June 2020 and December 2022 at the Affiliated Hospital of Kunming University of Science and Technology(AHKUST) were included in a retrospective cohort study. Based on whether there was a concurrent BLI diagnosis from high-resolution CT scans of the chest, the patients were divided into two groups: 238 in the NSCLC with BLI group (NSCLC-BLI group), and 269 in the NSCLC alone group. The collected therapeutic outcome measures included the objective response rate (ORR), progression-free survival (PFS), overall survival (OS), and the incidence rate of CIP. We analyzed the effect of BLI on the therapeutic efficacy of ICI treatment and the incidence rate of CIP in NSCLC patients.Inclusion criteria based on NSCLC patients staged I to IV according to the 8th edition of the International Association for Lung Cancer Research (IASLC)ResultsThe NSCLC-BLI group showed superior ORR to the NSCLC group when treated with ICIs. Multifactorial logistic regression and Cox analyses, adjusted for confounders, identified BLI as an independent positive prognostic factor for ORR (HR=0.482, 95%CI: 0.391-0.550; P<0.001) and PFS (HR=0.619; 95%CI: 0.551-0.771; P<0.001). No correlation between BLI and OS was found. Out of 26 cases of CIP, 12 were in the NSCLC-BLI group and 14 in the NSCLC group, with no significant difference in incidence (P=0.145).ConclusionNSCLC patients with BLI receiving ICI treatment show superior ORR and PFS compared to NSCLC alone without an increased CIP risk, positioning BLI as a predictive factor for improved outcomes in NSCLC patients receiving ICIs. However, the study has limitations including its retrospective nature and lacking data on BLI bacteria types and levels, which could influence therapy outcomes.