Studies have shown that gestational inflammation accelerates age-related memory impairment in mother mice. An enriched environment (EE) can improve age-related memory impairment, whereas mitochondrial dysfunction has been implicated in the pathogenesis of brain aging. However, it is unclear whether an EE can counteract the accelerated age-related memory impairment induced by gestational inflammation and whether this process is associated with the disruption of mitochondrial quality control (MQC) processes. In this study, CD-1 mice received daily intraperitoneal injections of lipopolysaccharide (LPS, 50 μg/kg) or normal saline (CON group) during gestational days 15–17 and were separated from their offspring at the end of normal lactation. The mothers that received LPS were divided into LPS group and LPS plus EE (LPS-E) treatment groups based on whether the mice were exposed to an EE until the end of the experiment. At 6 and 18 months of age, the Morris water maze test was used to evaluate spatial learning and memory abilities. Quantitative reverse transcription polymerase chain reaction and Western blot were used to measure the messenber RNA (mRNA) and protein levels of MQC-related genes in the hippocampus, respectively. The results showed that all the aged (18 months old) mice underwent a striking decline in spatial learning and memory performances and decreased mRNA/protein levels related to mitochondrial dynamics (Mfn1/Mfn2, OPA1, and Drp1), biogenesis (PGC-1α), and mitophagy (PINK1/parkin) in the hippocampi compared with the young (6 months old) mice. LPS treatment exacerbated the decline in age-related spatial learning and memory and enhanced the reduction in the mRNA and protein levels of MQC-related genes but increased the levels of PGC-1α in young mice. Exposure to an EE could alleviate the accelerated decline in age-related spatial learning and memory abilities and the accelerated changes in MQC-related mRNA or protein levels resulting from LPS treatment, especially in aged mice. In conclusion, long-term exposure to an EE can counteract the accelerated age-related spatial cognition impairment modulated by MQC in CD-1 mother mice that experience inflammation during pregnancy.