Shudage-4, an ancient and well-known formula in traditional Mongolian medicine comprising four different types of traditional Chinese medicine, is widely used in the treatment of gastric ulcers. However, the potential material basis and molecular mechanism of Shudage-4 in attenuating stress-induced gastric ulcers remain unclear. This study aimed to first explore the potential material basis and molecular mechanism of Shudage-4 in attenuating gastric ulcers in rats. The chemical constituents and transitional components in the blood of Shudage-4 were identified by ultra-performance liquid chromatography time-of-flight mass spectrometry (UPLC-TOF-MS). The rat gastric ulcer model was induced by water immersion restraint stress (WIRS). The ulcer damage to gastric tissue was measured at the gross anatomical level and pathological level by hematoxylin-eosin (HE) staining of gastric tissue. RNA sequencing of gastric tissue and plasma metabolomics were performed to analyze the mechanism of Shudage-4 against gastric ulcers. A Pearson correlation analysis was performed to explore the association between serum metabolites and gene expression of gastric tissue. A total of 30 chemical constituents were identified in Shudage-4 by UPLC-TOF-MS. Among 30 constituents, 13 transitional components in the blood were considered as the potential material basis. Shudage-4 treatment had a significant effect on WIRS-induced gastric ulcers in rats. HE staining of gastric tissue illustrated that WIRS-induced ulcer damage was suppressed by Shudage-4 treatment. RNA sequencing of gastric tissue showed that 282 reversed expression genes in gastric tissue were related to Shudage-4 treatment, and gene set enrichment analysis revealed that Shudage-4 treatment significantly inhibited gene set expression related to reactive oxygen species (ROS), which was also validated by detecting rat gastric tissue MDA, GSH, SOD, GSH-Px, and CAT activities. The plasma metabolomic data demonstrated that 23 significantly differential metabolites were closely associated with the Shudage-4 treatment. The further multiomics joint analysis found that significantly upregulated 5 plasma metabolites in Shudage-4-treated rats compared to model rats were negatively correlated with gene set expression related to ROS in gastric tissue. Shudage-4 alleviated WIRS-induced gastric ulcers by inhibiting ROS generation, which was achieved by regulating plasma metabolites level.