Type 2 diabetes (T2D) and Alzheimer's disease (AD) share several common pathophysiological features. Huperzine A (Hup A), a Lycopodium alkaloid extracted from the Chinese herb moss Huperzia serrata, is a specific and reversible inhibitor of acetylcholinesterase, which is clinically used for the treatment of AD. In this study, we investigated whether Hup A improved the metabolic and cognitive functions in the high fat-induced (HFD) obese mice and genetic ob/ob mice. HFD and ob/ob mice were treated with Hup A (0.1, 0.3 mg · kg-1 · d-1, ig) for 3 months. Body weight was monitored and glucose tolerance tests were performed. Novel object recognition test and Morris water maze assay were conducted to evaluate the cognitive functions. We found that the Hup A treatment had no significant effect on peripheral metabolism of obese mice, whereas Hup A (0.1, mg · kg-1 · d-1) improved both the abilities of object recognition and spatial memory in HFD-fed mice, but not in ob/ob mice. Furthermore, Hup A treatment significantly upregulated the insulin and phosphorylated Akt levels in the cortex of HFD-fed mice, but not ob/ob mice. In addition, Hup A (0.3, mg · kg-1 · d-1) significantly decreased cortical β-secretase (BACE1) expression. In conclusion, these results demonstrate that treatment with Hup A (0.1, mg · kg-1 · d-1) can effectively improve the cognitive functions, at least in diet-induced obese mice.