Diabetic encephalopathy (DE) is a severe complication of diabetes, but its pathogenesis remains unclear. This study aimed to investigate the roles and underlying mechanisms of high glucose (HG)- and advanced glycosylation end product (AGE)-induced oxidative stress (OS) in the cognitive decline in DE. The DE mouse model was established using a high-fat diet and streptozotocin, and its cognitive functions were evaluated using the Morris Water Maze, novel object recognition, and Y-maze test. The results revealed increased reactive oxygen species (ROS) generation, mitophagy inhibition, and decreased prohibitin 2 (PHB2) expression in the hippocampal neurons of DE mice and HG- or AGE-treated HT-22 cells. However, overexpression of PHB2 reduced ROS generation, reversed mitophagy inhibition, and improved mitochondrial function in the HG- or AGE-treated HT-22 cells and ameliorated cognitive decline, improved mitochondrial structural damage, and reversed mitophagy inhibition of hippocampal neurons in DE mice. Further analysis revealed that the Kelch-like ECH-associated protein 1 (Keap1)–nuclear factor erythroid 2-related factor 2 (Nrf2) pathway was involved in the HG- or AGE-mediated downregulation of PHB2 in HT-22 cells. These results demonstrate that HG- or AGE-induced OS inhibits the mitophagy of hippocampal neurons via the Keap1–Nrf2–PHB2 pathway, thereby contributing to the cognitive decline in DE.