Cognitive impairment is increasingly recognized as an important comorbidity of diabetes progression; however, the underlying molecular mechanism is unclear. Dapagliflozin, an inhibitor of sodium-glucose co-transporter 2 (SGLT2), has shown promising effects against diabetes in rodent experiments and human clinical assays. This study aimed to determine the underlying mechanism and examine the effect of dapagliflozin on diabetic cognitive impairment. To create an in vivo model of diabetic cognitive impairment, streptozotocin (STZ)-induced diabetic mice were used. Dapagliflozin was administered to mice for 8 weeks. The context fear condition and Morris water maze test was used to evaluate mice's behavioral change. Western blotting was used to evaluate protein expression. Hematoxylin and eosin (HE) and Nissl staining were applied to monitor morphological and structural changes. Congo red staining was performed to identify the formation of senile plaques. Mitochondria morphology was examined using a transmission electron microscope, and blood flow in the mouse cerebral cortex was measured using a laser Doppler imaging assay. Comparison to the diabetes mellitus (DM) group, the dapagliflozin group had lower glucose levels. Behavioral studies have shown that dapagliflozin can restore memory deficits in diabetic mice. The murky cell membrane edges and Nissl bodies more difficult to identify in the DM group were revealed by HE and Nissl staining, which were both improved by dapagliflozin treatment. Dapagliflozin inhibited the progression of Aβ generation and the reduced cerebral blood flow in the DM group was rescued. After dapagliflozin treatment, damaged mitochondria and lack of SGLT2 in the hippocampus and cortex of diabetic mice were repaired. Diabetes-induced cognitive dysfunction was attenuated by dapagliflozin and the effect was indirect rather than direct.