Aging and apolipoprotein E4 (ApoE4) can increase the risk of cognitive impairment and neurodegenerative disorders, including Alzheimer's disease (AD), and patients with type 2 diabetes mellitus are highly susceptible to cognitive dysfunction. Recent research has indicated that metformin, a prescribed drug for type 2 diabetes, may affect cognitive function; however, findings regarding its efficacy are largely controversial. The current study reported that a 5‐mo metformin administration (300 mg/kg/d) starting at 13 mo old improved the spatial memory of ApoE3‐target replacement (TR) mice, not ApoE4‐TR mice. It found that in aged ApoE3‐TR mice, metformin treatment, at a molecular level, inhibited AMPK activity, increased insulin signaling, and activated mammalian target of rapamycin signaling, resulting in an enhanced expression of postsynaptic proteins; but the response of the neuronal AMPK activity and insulin signaling to metformin was blunt in aged ApoE4‐TR mice. Meanwhile, metformin treatment also increased the phosphorylation of tau in both ApoE3‐TR and ApoE4‐TR mice, implying that metformin may have side effects in human. These findings suggest that metformin can improve the cognitive performance of aged mice in an APOE genotype–dependent manner, which provides empirical insights into the clinical value of metformin for ApoE4‐ and age‐related AD prevention and treatment.—Zhang, J., Lin, Y., Dai, X., Fang, W., Wu, X., Chen, X. Metformin treatment improves the spatial memory of aged mice in an APOE genotype–dependent manner. FASEB J. 33, 7748–7757 (2019). http://www.fasebj.org