The ketogenic diet, characterized by high fat and low carbohydrates, has gained popularity not only as a strategy for managing body weight but also for its efficacy in delaying cognitive decline associated with neurodegenerative diseases and the aging process. Since this dietary approach stimulates the liver’s production of ketone bodies, primarily β-hydroxybutyrate (BHB), which serves as an alternative energy source for neurons, we investigated whether BHB could mitigate impaired AMPA receptor trafficking, synaptic dysfunction, and cognitive decline induced by metabolic challenges such as saturated fatty acids. Here, we observe that, in cultured primary cortical neurons, exposure to palmitic acid (200μM) decreased surface levels of glutamate GluA1-containing AMPA receptors, whereas unsaturated fatty acids, such as oleic acid and ω-3 docosahexaenoic acid (200μM), and BHB (5mM) increased them. Furthermore, BHB countered the adverse effects of palmitic acid on synaptic GluA1 levels in hippocampal neurons, as well as excitability and plasticity in hippocampal slices. Additionally, daily intragastric administration of BHB (100 mg/kg/day) for two months reversed cognitive impairment induced by a saturated high-fat diet (49% of calories from fat) in a mouse experimental model of obesity. In summary, our findings underscore the significant impact of fatty acids and ketone bodies on AMPA receptors abundance, synaptic function and neuroplasticity, shedding light on the potential use of BHB to delay cognitive impairments associated with metabolic diseases.