Introduction: Immune checkpoint inhibitors (ICI) are the new standard therapy in patients with metastatic NSCLC (mNSCLC). Metformin, previously associated with improved chemotherapy efficacy in diabetic and nondiabetic cancer patients, was recently associated with increased ICI efficacy. In this study, we aimed to explore the correlations between diabetes mellitus (DM), metformin use, and benefit from ICI in mNSCLC patients. Methods: All mNSCLC patients treated with ICI in our center between February 2015 and April 2018 were identified. Demographic and clinical data were extracted retrospectively. Cox proportional hazards regression, t tests, and χ2 tests were employed to evaluate associations of progression-free survival (PFS), overall survival (OS), overall response rate (ORR), and disease control rate (DCR), with DM status, metformin use, and HbA1c levels, as appropriate. Results: Of 249 mNSCLC patients treated with ICI, 57 (22.8%) had DM. Thirty-seven (64.9% of all diabetic patients) patients were treated with metformin. A significant negative correlation of DM with PFS and OS was demonstrated (HR 1.5 [1.01–2.06], p = 0.011, and HR 1.5 [1.08–2.08], p = 0.017, respectively). Metformin exposure had no significant correlation with PFS or OS in diabetic mNSCLC patients (HR 1.08 [0.61–1.93], p = 0.79, and HR 1.29 [0.69–2.39], p = 0.42, respectively). There were no differences between groups with respect to ORR and DCR. Conclusion: Our data show a potential negative relationship between DM and ICI efficacy in mNSCLC patients. In contrast to reports with chemotherapy, we found no positive relationship between metformin use and ICI therapy in diabetic patients with mNSCLC. Further studies are needed to evaluate the effect of metformin in nondiabetic mNSCLC patients.