Hypoxia-ischemia (HI) represents one of the most common causes of neonatal encephalopathy. The central nervous system injury comprises several mechanisms, including inflammatory, excitotoxicity, and redox homeostasis unbalance leading to cell death and cognitive impairment. Exercise during pregnancy is a potential therapeutic tool due to benefits offered to mother and fetus. Swimming during pregnancy elicits a strong metabolic programming in the offspring’s brain, evidenced by increased antioxidant enzymes, mitochondrial biogenesis, and neurogenesis. This article aims to evaluate whether the benefits of maternal exercise are able to prevent behavioral brain injury caused by neonatal HI. Female adult Wistar rats swam before and during pregnancy (30 min/day, 5 days/week, 4 weeks). At 7th day after birth, the offspring was submitted to HI protocol and, in adulthood (60th day), it performed the behavioral tests. It was observed an increase in motor activity in the open field test in HI-rats, which was not prevented by maternal exercise. The rats subjected to maternal swimming presented an improved long-term memory in the object recognition task, which was totally reversed by neonatal HI encephalopathy. BDNF brain levels were not altered; suggesting that HI or maternal exercise effects were BDNF-independent. In summary, our data suggest a beneficial long-term effect of maternal swimming, despite not being robust enough to protect from HI injury.