Sparganii rhizoma (SL) has potential therapeutic effects on gastric cancer (GC), but its main active ingredients and possible anticancer mechanism are still unclear. In this study, we used HPLC-Q-TOF–MS/MS to comprehensively analyse the chemical components of the aqueous extract of SL. On this basis, a network pharmacology method incorporating target prediction, gene function annotation, and molecular docking was performed to analyse the identified compounds, thereby determining the main active ingredients and hub genes of SL in the treatment of GC. Finally, the mRNA and protein expression levels of the hub genes of GC patients were further analysed by the Oncomine, GEPIA, and HPA databases. A total of 41 compounds were identified from the aqueous extract of SL. Through network
analysis, we identified seven main active ingredients and ten hub genes: acacetin, sanleng acid, ferulic acid, methyl 3,6-dihydroxy-2-[(2-hydroxyphenyl) ethynyl]benzoate, caffeic acid, adenine nucleoside, azelaic acid and PIK3R1, PIK3CA, SRC, MAPK1, AKT1, HSP90AA1, HRAS, STAT3, FYN, and RHOA. The results indicated that SL might play a role in GC treatment by controlling the PI3K-Akt and other signalling pathways to regulate biological processes such as proliferation, apoptosis, migration, and angiogenesis in tumour cells. In conclusion, this study used HPLC-Q-TOF–MS/MS combined with a network pharmacology approach to provide an essential reference for identifying the chemical components of SL and its mechanism of action in the treatment of GC.