ContextPolygonum hydropiper L. (P. hydropiper) has outstanding clinical efficacy in treating both acute and chronic gastroenteritis. However, the definite mechanism remains unclear. ObjectiveThis study aimed to explore the potential mechanisms of the total flavonoid of P. hydropiper (FPH) in stress-induced gastric mucosal damage (SGMD) rats through a combination of network pharmacology, molecular docking, and animal experiments. MethodsNetwork pharmacology and molecular docking were utilized to predict the potential mechanisms of FPH against SGMD. In experimental studies, SGMD rat models were established using water-immersion restraint stress (WIRS). FPH was administered at doses of 140, 70, and 35 mg/kg, with ranitidine serving as a positive control, through gavage once daily for 6 consecutive days after model establishment. Stomach and serum specimens were analyzed using HE staining, Western blotting, qPCR, and ELISA to investigate the protective mechanism of FPH in SGMD. ResultsThe network pharmacology analysis identified 16 active ingredients and 183 common targets, with potential pathways including PI3K/Akt, MAPK and Keap1/Nrf2. In vivo experiments demonstrated that FPH intervention alleviated SGMD pathological changes, reduced elevated serum IL-6 and TNF-α levels, and enhanced SOD and GSH activity in rats. Additionally, FPH increased the protein expression of p62, Nrf2, HO-1, PI3K, and p-Akt, along with mRNA levels of Nrf2, p62, and HO-1. ConclusionsFPH exerts a gastric mucosal protective effect by upregulating antioxidant gene expression through the PI3K/Akt and Keap1/Nrf2 pathways. This study provides an experimental basis for the potential clinical treatment of SGMD with the traditional Chinese medicine P. hydropiper.