Preclinical data suggest antifungal azole derivatives have antitumor efficacy that may modulate response to immune checkpoint inhibitors (ICIs). We aimed to evaluate the association of azole drugs with overall survival (OS) in a population of patients with non-small cell lung cancer (NSCLC) treated with ICI within the Veterans Health Administration (VHA). In this retrospective study, the VA Corporate Data Warehouse was queried for patients diagnosed with NSCLC and treated with ICI from 2010 to 2018. Concomitant oral azole use was defined as dispensation by a VA pharmacy within 90 days of the first ICI infusion. Patients who received azole after 30 days were excluded from the analysis to mitigate immortal time bias. OS was measured from the start of ICI. Cox regression and propensity score matching were used to adjust for confounders. We identified 3413 patients with NSCLC receiving ICI; 324 (9.5%) were exposed to concomitant azoles. As a group, azole use was not associated with OS (hazard ratio [HR] = 0.96; 95% CI, 0.84-1.09; P = .51). After stratification by azole type, clotrimazole had an association with better OS on univariable (HR = 0.75; 95% CI, 0.59-0.96; P = .024) and multivariable analysis (HR = 0.71; 95% CI, 0.56-0.91; P = .007). Propensity score matching of patients who received clotrimazole vs no azole yielded 101 patients per matched cohort. Clotrimazole was associated with improved OS, although this did not meet the threshold for statistical significance (HR = 0.74; 0.54-1.01; P = .058). This observational study demonstrated an association between clotrimazole and OS among patients with advanced NSCLC receiving ICI. These findings build upon preclinical evidence and support further investigation into the potential for clotrimazole as a repurposed FDA drug to improve cancer outcomes.