Gastric ulcer (GU) is a peptic disease with high morbidity and mortality rates affecting approximately 4% of the population throughout the world. Current therapies for GU are limited by the high relapse incidence and side effects. Therefore, novel effective antiulcer drugs are urgently needed. Ginsenosides have shown good anti-GU effects, and the major intestinal bacterial metabolite of ginsenosides, protopanaxatriol (PPT), is believed to be the active component. In this study, we evaluated the anti-GU effect of PPT in rats in an acetic acid-induced GU model. High (H-PPT) and medium (M-PPT) doses of PPT (20.0 and 10.0 mg/mg/day) significantly reduced the ulcer area and the ET-1, IL-6, EGF, SOD, MDA and TNF-α levels in serum were regulated by PPT in a dose-dependent manner. We also investigated the mechanisms of anti-GU activity of PPT based on metabolomics coupled with network pharmacology strategy. The result was that 16 biomarkers, 3 targets and 3 metabolomic pathways were identified as playing a vital role in the treatment of GU with PPT and were further validated by molecular docking. In this study, we have demonstrated that the integrated analysis of metabolomics and network pharmacology is an effective strategy for deciphering the complicated mechanisms of natural compounds.