Gastric cancer (GC) is the most aggressive malignant tumor of the digestive tract. However, there is still a lack of effective treatment methods in clinical practice. Studies have shown that dehydroandrographolide (DA) has been shown to have anti-cancer activity in a variety of cancers, but it has not been reported in GC. Firstly, we obtained data on DA target genes, GC-related genes, and differentially expressed genes (DEGs) from the PharmMapper, GeneCards, and GEO databases, respectively. Then, the STRING database was used to construct the protein–protein interaction network of intersection genes, and Gene Ontology and Kyoto Encyclopedia of Genes and Genomes analyses of intersection genes were performed. Finally, 8 hub target genes were identified by analyzing their expression and prognostic survival, and molecular docking between the hub genes and DA was performed. In this study, 293 DA drug target genes, 11,366 GC-related genes, and 3184 DEGs were identified. Gene Ontology and KEGG analysis showed that the intersection genes of DA targets and GC-related genes were mainly related to cancer pathways involving apoptosis and cell adhesion. The intersection genes of DEGs, DA targets, and GC-related genes were also mainly related to cancer pathways involving chemical carcinogenesis, and drug metabolism. The molecular docking results showed that the 8 hub target genes had an apparent affinity for DA, which could be used as potential targets for DA treatment of GC. The results of this study show that the molecular mechanism by which DA inhibits GC metastasis involves multiple target genes. It may play an essential role in inhibiting the invasion and metastasis of GC by regulating the expression and polymorphism of hub target genes, such as MMP9, MMP12, CTSB, ESRRG, GSTA1, ADHIC, CA2, and AKR1C2.