To identify and analyze the main ingredients of Salvia chinensis and to explore its therapeutic targets for gastric cancer, HPLC-Q-TOF-MS/MS was used to analyze the water dissolved compositions in Salvia chinensis and the TCMSP platform was used to screen the potential active ingredients. The results showed that a total of 48 compounds were identified, mainly including phenolic acids, flavonoids and other common substances. And among 48 compounds, there were 9 ingredients owning excellent in vivo activity. The therapeutic targets of the active ingredients were obtained by searching the Swiss Target Prediction database, and then taking the intersection with the gastric cancer targets retrieved from the DisGeNET database, a total of 18 targets for the treatment of gastric cancer were obtained. GO and KEGG pathway enrichment analysis using DAVID revealed that the components from Salvia chinensis involved 48 biological processes (BP), 8 cellular components (CC), 27 molecular functions (MF) and 8 pathways in the treatment of gastric cancer. Finally, STRING database and Cytoscape software were used to construct a PPI network. The results showed that target proteins such as EGFR、CDH1、CTNNB1、PTGS2、EGF, etc. played a key role in the PPI network. It can be concluded that there are various active ingredients in Salvia chinensis, and they can treat gastric cancer mainly by inhibiting proliferation, migration, inducing apoptosis, reducing drug resistance through drug reaction, plasma membrane, enzyme binding, etc.