Aging is one of the most serious factors for central nervous dysfunctions, which lead to cognitive impairment. New highly effective drugs are required to slow the development of cognitive dysfunction. This research studied the effect of dimethyl fumarate (DMF), methylene blue (MB), and resveratrol (RSV) on the cognitive functions of 15-month-old mice and their relationship to the maintenance of mitochondrial quality control in the brain and the bacterial composition of the gut microbiome. We have shown that studied compounds enhance mitochondrial biogenesis, mitophagy, and antioxidant defense in the hippocampus of 15-month-old mice via Nrf2/ARE pathway activation, which reduces the degree of oxidative damage to mtDNA. It is manifested in the improvement of short-term and long-term memory. We have also shown that memory improvement correlates with levels of Roseburia, Oscillibacter, ChristensenellaceaeR-7, Negativibacillus, and Faecalibaculum genera of bacteria. At the same time, long-term treatment by MB induced a decrease in gut microbiome diversity, but the other markers of dysbiosis were not observed. Thus, Nrf2/ARE activators have an impact on mitochondrial quality control and are associated with a positive change in the composition of the gut microbiome, which together lead to an improvement in memory in aged mice.