The natural polyamine spermidine and spermine have been reported to ameliorate aging and aging-induced dementia. However, the mechanism is still confused. An aging model, the senescence accelerated mouse-8 (SAMP8), was used in this study. Novel object recognition and the open field test results showed that oral administration of spermidine, spermine and rapamycin increased discrimination index, modified number, inner squares distance and times. Spermidine and spermine increased the activity of SOD, and decreased the level of MDA in the aging brain. Spermidine and spermine phosphorylate AMPK and regulate autophagy proteins (LC3, Beclin 1 and p62). Spermidine and spermine balanced mitochondrial and maintain energy for neuron, with the regulation of MFN1, MFN2, DRP1, COX IV and ATP. In addition, western blot results (Bcl-2, Bax and Caspase-3, NLRP3, IL-18, IL-1β) showed that spermidine and spermine prevented apoptosis and inflammation, and elevate the expression of neurotrophic factors, including NGF, PSD95and PSD93 and BDNF in neurons of SAMP8 mice. These results indicated that the effect of spermidine and spermine on anti-aging is related with improving autophagy and mitochondrial function.