Introduction: Ginsenoside Rg2 (GRg2), a naturally occurring triterpenoid derived from ginseng rhizomes, exhibits neuroprotective properties. Neuroinflammation is recognized as one of the key pathogenic mechanisms underlying Alzheimer';s disease (AD). This research aims to investigate the beneficial effects of GRg2 on AD and explore its potential mechanisms. Methods: In APP/PS1 mice, cognitive and behavioral assessments were first performed. Subsequently, brain tissue analyses were performed using immunohistochemical analysis and Western blot. A combined analysis of the gut microbiome and metabolomics was conducted to explore potential mechanisms. Finally, key findings were further validated through immunofluorescence and enzymelinked immunosorbent assay. Results: GRg2 enhanced learning, memory, and cognitive functions. And inhibits the deposition of β- amyloid and phosphorylated tau. GRg2 effectively inhibits the production of Bacteroides and Helicobacter. In addition, it reduced the levels of pyruvaldehyde and trimethylamine N-oxide, metabolites closely related to neuroinflammation. GRg2 effectively inhibited the activation of astrocytes and microglia in the brains of APP/PS1 mice, and also reduced the expression of neuroinflammatory mediators IL-6, IL-1β, and TNF-α. Discussions: The findings of this study substantiate the neuroprotective efficacy of GRg2, providing a novel therapeutic strategy and theoretical foundation for natural product-based interventions against AD. Conclusion: GRg2 improves cognitive function and mitigates AD pathology, which is at least partially attributed to its regulation of gut microbiota and metabolites, as well as its anti-neuroinflammatory effects.