Abstract:Objective To evaluate the effect of type 2 diabetes mellitus (T2DM) on the efficacy and prognosis of patients with advanced non-small cell lung cancer (NSCLC) receiving immune checkpoint inhibitors (ICI) combined with chemotherapy, and to explore the potential role of metformin in immunotherapy of these patients.Methods A retrospective analysis was conducted on 1 088 patients with advanced NSCLC who received at least two cycles of ICI therapy at Hunan Cancer Hospital between January 2020 and February 2025. Using propensity score matching (PSM), we compared the clinical characteristics, progression-free survival (PFS), and overall survival (OS) between the T2DM group (n=124) and the non-diabetes group (n=964). Survival analysis was performed using the Kaplan-Meier method with between-group comparisons by the Log-rank test. Hazard ratios (HR) and 95% confidence intervals (CI) were calculated using the Cox proportional hazards regression model.Results Before matching, the median PFS was significantly longer in the T2DM group (13.0 months) than in the non-diabetes group (8.5 months) (HR=0.71, 95% CI: 0.58~0.85, P=0.002 4). After PSM, the T2DM group maintained a superior median PFS (13.0 months vs. 10.7 months in the non-diabetes group, P<0.05). A statistically significant difference in OS was observed before matching but not after matching. Subgroup analysis revealed that patients using metformin had a significantly longer median PFS (18.3 months) compared to those not using metformin (9.2 months) (HR=0.63, n95% CI: 0.41~0.97, P=0.041 6). Regarding safety, there was no significant difference in the overall incidence of any grade immune-related adverse events (irAEs) between the two groups (64.5% vs. 68.4%, P=0.379). However, the incidence of grade ≥3 irAEs was significantly higher in the T2DM group (15.3% vs. 6.8%, P=0.001), particularly the risk of transaminase elevation (5.6% vs. 1.6%, P=0.010).Conclusions Advanced NSCLC patients with comorbid T2DM receiving ICIs combined with chemotherapy exhibited significantly improved PFS, which was more pronounced among metformin users, suggesting that metformin may delay disease progression through metabolic modulation and immune mechanisms. However, T2DM comorbidity was also associated with a higher risk of severe immune-related toxicity, necessitating enhanced clinical monitoring. Although T2DM significantly influenced PFS, its impact on OS requires further investigation. Future studies should delve deeper into the interaction between diabetes and immunotherapy to provide more precise guidance for clinical practice.