Decreased cognitive performance is a hallmark of brain aging, but the underlying mechanisms and potential therapeutic avenues remain poorly understood. Recent studies have revealed health-protective and lifespan-extending effects of dietary spermidine, a natural autophagy-promoting polyamine. Here, we show that dietary spermidine passes the blood-brain barrier in mice and increases hippocampal eIF5A hypusination and mitochondrial function. Spermidine feeding in aged mice affects behavior in homecage environment tasks, improves spatial learning, and increases hippocampal respiratory competence. In a Drosophila aging model, spermidine boosts mitochondrial respiratory capacity, an effect that requires the autophagy regulator Atg7 and the mitophagy mediators Parkin and Pink1. Neuron-specific Pink1 knockdown abolishes spermidine-induced improvement of olfactory associative learning. This suggests that the maintenance of mitochondrial and autophagic function is essential for enhanced cognition by spermidine feeding. Finally, we show large-scale prospective data linking higher dietary spermidine intake with a reduced risk for cognitive impairment in humans.