This study aims to investigate the mechanism of Astragali Radix-Curcumae Rhizoma(HQEZ) in the treatment of gastric cancer based on network pharmacology. Further, the SGC7901 cell model of gastric cancer was employed to validate the efficacy and key targets of the herb pair. Firstly, the CCK-8 assay was employed to evaluate the direct effect of HQEZ on the proliferation of gastric cancer SGC7901 cells. Then, network pharmacology methods were employed to investigate the active ingredients, key targets, and key signaling pathways involved in the treatment of gastric cancer with HQEZ. The results showed that HQEZ contained 18 potential active ingredients, such as quercetin, naringenin, and curcumin. The results of gene ontology(GO) functional annotation and Kyoto Encyclopedia of Genes and Genomes(KEGG) pathway enrichment suggested that the main targets of HQEZ in treating gastric cancer were involved in the regulation of protein serine/threonine kinase activity, activation of mitogen-activated protein kinase(MAPK) activity, cysteine-type endopeptidase activity, and negative regulation of protein serine/threonine kinase activity. The hypoxia-inducible factor-1(HIF-1) signaling pathway, ATP-binding cassette(ABC) transporters, cytochrome P450-mediated metabolism of xenobiotics, p53 signaling pathway, and cell apoptosis were key signaling pathways of HQEZ in treating gastric cancer. The cell experiments demonstrated that HQEZ significantly downregulated the expression of ATP-binding cassette subfamily B member 1(ABCB1), epidermal growth factor receptor(EGFR), phosphorylated serine/threonine kinase(p-AKT), hypoxia inducible factor 1 subunit alpha(HIF1A), B-cell lymphoma 2(BCL2), breast cancer susceptibility protein 1(BRCA1), DNA polymerase theta(POLH), ribonucleotide reductase M1(RRM1), and excision repair cross-complementation group 1(ERCC1), and upregulated the expression of tumor protein P53(TP53) and cysteinyl aspartate-specific proteinase(CAPS3). Finally, a multivariate COX regression model was adopted to study the relationship between gene expression and clinical information data of gastric cancer patients in the TCGA database, which demonstrated that the key targets of HQEZ were associated with the poor prognosis in gastric cancer patients. Further feature selection using the LASSO algorithm showed that EGFR, HIF1A, TP53, POLH, RRM1, and ERCC1 were closely associated with the survival of gastric can-cer patients. In conclusion, HQEZ regulates the expression of genes involved in DNA repair, survival, and apoptosis in gastric cancer cells via multiple targets and pathways, assisting the treatment of gastric cancer.