Taken together, our data indicated that long-term aerobic exercise improves type 2 diabetes mellitus-related cognitive impairment by inhibiting JAK2/STAT3 and enhancing AMPK/SIRT1 pathways in mice. Here, STAT3 is linked to diabetes mellitus.