Alzheimer’s disease (AD) is closely related to hippocampal synapse loss, which can be alleviated by running exercise. However, further studies are needed to determine whether running exercise reduces synapse loss in the hippocampus in an AD model by regulating microglia. Ten-month-old male wild-type mice and APP/PS1 mice were randomly divided into control and running groups. All mice in the running groups were subjected to voluntary running exercise for four months. After the behavioral tests, immunohistochemistry, stereological methods, immunofluorescence staining, 3D reconstruction, western blotting and RNA-Seq were performed. Running exercise improved the spatial learning and memory abilities of APP/PS1 mice and increased the total number of dendritic spines, the levels of the PSD-95 and Synapsin Ia/b proteins, the colocalization of PSD-95 and neuronal dendrites (MAP-2) and the number of PSD-95-contacting astrocytes (GFAP) in the hippocampi of APP/PS1 mice. Moreover, running exercise reduced the relative expression of CD68 and Iba-1, the number of Iba-1+ microglia and the colocalization of PSD-95 and Iba-1+ microglia in the hippocampi of APP/PS1 mice. The RNA-Seq results showed that some differentially expressed genes (DEGs) related to the complement system (Cd59b, Serping1, Cfh, A2m, and Trem2) were upregulated in the hippocampi of APP/PS1 mice, while running exercise downregulated the C3 gene. At the protein level, running exercise also reduced the expression of advanced glycation end products (AGEs), receptor for advanced glycation end products (RAGE), C1q and C3 in the hippocampus and AGEs and RAGE in hippocampal microglia in APP/PS1 mice. Furthermore, the Col6a3, Scn5a, Cxcl5, Tdg and Clec4n genes were upregulated in the hippocampi of APP/PS1 mice but downregulated after running, and these genes were associated with the C3 and RAGE genes according to protein–protein interaction (PPI) analysis. These findings indicate that long-term voluntary exercise might protect hippocampal synapses and affect the function and activation of microglia, the AGE/RAGE signaling pathway in microglia and the C1q/C3 complement system in the hippocampus in APP/PS1 mice, and these effects may be related to the Col6a3, Scn5a, Cxcl5, Tdg and Clec4n genes. The current results provide an important basis for identifying targets for the prevention and treatment of AD.