In the current study, we identified several findings in naturally ageing rats: (1) long-term atorvastatin improved cognitive decline; (2) long-term atorvastatin can affect RA metabolism by altering Rdh7 expression in the intestine, which in turn leads to the proliferation of intestinal Treg cells and inhibition of IL-17+γδ T-cell function; (3) long-term atorvastatin decreased IL-17 expression in the hippocampal region tissue; and (4) long-term atorvastatin increased intestinal flora richness. This evidence concerns the gene IL17A and Mental deterioration.