Lacunes are the manifestations of lacunar infarction which can lead many patients to the clinical outcome of disability or dementia. However, the relationship between lacune burden, cognitive function and blood glucose fluctuation in patients with type 2 diabetes mellitus (T2DM) complicated with lacunes is not very clear. To explore the correlation between glucose variability, lacune burden and cognitive function in patients with lacunes complicated with T2DM. The clinical and imaging data of 144 patients with lacunes combined with T2DM were reviewed retrospectively. 72 h continuous glucose monitoring was performed. The Montreal Cognitive Assessment was used to assess cognitive function. The burden of lacunes was evaluated using magnetic resonance imaging performance. Multifactorial logistic regression analysis was used to study the affecting the lacune load and cognitive impairment in patients. To predict the value of patients' cognitive impairment with lacunes complicated with T2DM, a receiver operating characteristic (ROC) curve and a nomogram prediction model were constructed. The standard deviation (SD) of the average blood glucose concentration, percentage coefficient of variation (%CV) and time of range (TIR) were significantly different between the low and the high load groups (P < 0.05). The SD, %CV and TIR of the cognitive impairment group and non-cognitive impairment group were significantly different (P < 0.05). SD (odds ratio (OR): 3.558, 95% confidence interval (CI): 1.268-9.978, P = 0.006), and %CV (OR: 1.192, 95%CI: 1.081-1.315, P < 0.05) were the risk factors for an increased infarct burden in lacunes patients complicated with T2DM. TIR (OR: 0.874, 95%CI: 0.833-0.928, P < 0.05) is a protective factor. In addition, an increased SD (OR: 2.506, 95%CI: 1.008-6.23, P = 0.003), %CV (OR: 1.163, 95%CI: 1.065-1.270, P < 0.05) were the risk factors for cognitive impairment in patients with lacunes complicated with T2DM, TIR (OR: 0.957, 95%CI: 0.922-0.994, P < 0.05) is a protective factor. A nomogram prediction model of the risk of cognitive impairment was established based on SD, %CV and TIR. Decision curve analysis and the internal calibration analysis were used for internal verification and showed that the model was clinical benefit. The area under the ROC curves for predicting cognitive impairment in patients with lacunes complicated with T2DM was drawn were %CV: 0.757 (95%CI :0.669-0.845, P < 0.05), TIR: 0.711 (95%CI: 0.623-0.799, P < 0.05). Blood glucose variability is closely associated with the level of lacune burden and cognitive dysfunction in lacune patients combined with T2DM. %CV, TIR have a certain predictive effect in cognitive impairment in lacune patients.