Glucose variation (GV) has emerged as a predictor of morbidity and mortality in persons with diabetes. However, no study has examined whether brain magnetic resonance imaging (MRI) variables mediated the association between mortality and GV. This study was a retrospective cohort comprising 3,961 individuals with type 2 diabetes (T2D), whose electronic medical records were retrieved from a medical center between January 2001 and October 2021. GV was quantified using coefficient of variation of fasting plasma glucose (FPG-CV) and glycated hemoglobin (HbA1c). The MRI variables included the presence or absence of cerebrovascular abnormality and white matter hyperintensity (WMH). All deaths and deaths resulting from expanded cardiovascular disease (CVD) were identified through annual record linkage with National Death Datasets. Cox proportional hazards models were applied to evaluate associations of MRI variable or GV with mortality. Mediation analyses were performed to assess the relative contributions of MRI variables for GV on mortality. Among 3,961 patients, 2,114 patients (53.4%) had cerebrovascular abnormality and 1,888 patients (47.7%) had WMH. The results showed cerebrovascular abnormality and WMHs were significantly associated with all-cause and expanded CVD mortality after considering GV. The largest mediated effects of GV on all-cause and expanded CVD mortality were observed by cerebrovascular abnormality (5.26% and 8.49%, respectively). Our study suggests cerebrovascular abnormality and WMHs are important predictors of mortality in patients with T2D after considering GV. In addition, MRI variables of cerebrovascular abnormality expressed weak but significant mediation effect on the associations between GV and mortality.