The long-term high-fat, high-sugar diet exacerbates type 2 diabetes mellitus (T2DM)-related cognitive impairments. Phlorizin, a well-studied natural compound found in apples and other plants, is recognized for its bioactive properties, including modulation of glucose and lipid metabolism. Despite its established role in mitigating metabolic disorders, the neuroprotective effects of phlorizin, particularly against diabetes-related cognitive dysfunction, have not been fully elucidated. Therefore, the present study aimed to investigate the effect of dietary supplementation of phlorizin on high-fat and high-fructose diet (HFFD)-induced cognitive dysfunction and evaluate the crucial role of the microbiota-gut-brain axis. We found that dietary supplementation of phlorizin for 14 weeks effectively prevented glucolipid metabolism disorder, spatial learning impairment, and memory impairment in HFFD mice. In addition, phlorizin improved the HFFD-induced decrease in synaptic plasticity, neuroinflammation, and excessive activation of microglia in the hippocampus. Transcriptomics analysis shows that the protective effect of phlorizin on cognitive impairment was associated with increased expression of neurotransmitters and synapse-related genes in the hippocampus. Phlorizin treatment alleviated colon microbiota disturbance, mainly manifested by an increase in gut microbiota diversity and the abundance of short-chain fatty acid (SCFA)-producing bacteria. The level of microbial metabolites, including SCFA, inosine 5'-monophosphate (IMP), and D (-)-beta-hydroxybutyric acid (BHB) were also significantly increased after phlorizin treatment. Integrating multiomics analysis observed tight connections between phlorizin-regulated genes, microbiota, and metabolites. Furthermore, removal of the gut microbiota via antibiotics treatment diminished the protective effect of phlorizin against HFFD-induced cognitive impairment, underscoring the critical role of the gut microbiota in mediating cognitive behavior. Importantly, supplementation with SCFA and BHB alone mimicked the regulatory effects of phlorizin on cognitive function. Therefore, phlorizin shows promise as a potential nutritional therapy for addressing cognitive impairment associated with metabolic disorders. Further research is needed to explore its effectiveness in preventing and alleviating neurodegenerative diseases.