Aerobic exercise (AE) benefits brain health and behavior. Serotonin (5-HT) and brain-derived neurotrophic factor (BDNF) are known to mediate and shape cognitive processes. Both systems share some actions: BDNF is involved in the maturation and function of 5-HT neurons. In turn, 5-HT is involved in neuroplasticity phenomena mediated by BDNF and stimulated by exercise. The aim of this work was to study the long-term effects of AE on BDNF- 5-HT systems and cognitive function in rats at different ages. A lifelong moderate-intensity aerobic training program was designed, in which aerobically exercised (E) and sedentary control (C) rats were studied at middle (8 months) and old age (18 months) by means of biochemical, immunohistochemical and behavioral assays. The levels and expression of BDNF, 5-HT, serotonin transporter (SERT) and 5-HT1A receptor were determined in selected brain areas involved in memory and learning. Immunopositive cells to neuronal nuclear protein (NeuN) in the hippocampus CA1 area were also quantified. The cognitive function was evaluated by the object recognition test (ORT). Results indicate that AE enhanced spatial and non-spatial memory systems, modulated by age. This outcome temporarily correlated with a significant upregulation of cortical, hippocampal and striatal BDNF levels in parallel with an increase in the number of hippocampal CA1-mature neurons. AE also increased brain and raphe 5-HT levels, as well as the expression of SERT and 5-HT1A receptor in the cortex and hippocampus. Old AE rats showed a highly conserved response, indicating a remarkable protective effect of exercise on both systems. In summary, lifelong AE positively affects BDNF-5-HT systems, improves cognitive function and protects the brain against the deleterious effects of sedentary life and aging.