Type 2 diabetes mellitus (T2DM), accounting for the majority of diabetes mellitus prevalence, is associated with an increased risk of cognition decline and deterioration of cognition function in diabetic patients. The sodium–glucose cotransporter 2 (SGLT2), located in the renal proximal tubule, plays a role in urine glucose reabsorption. SGLT2 inhibitors (SGLT2i), have shown potential benefits beyond cardiac and renal improvement in preventing and treating cognitive impairment (CI), including mild cognitive impairment, Alzheimer’s disease and vascular dementia in T2DM patients. Studies suggest that SGLT2i may ameliorate diabetic CI through metabolism pathways, inflammation, oxidative stress, neurotrophic factors and AChE inhibition. Clinical trials and meta-analyses have reported significant and insignificant results. Given their vascular effects, SGLT2i may offer unique protection against vascular CI. This review compiles mechanisms and clinical evidence, emphasizing the need for future analysis, evaluation, trials and meta-analyses to verify and recommend optimal SGLT2i selection and dosage for specific patients.