Agastache rugosa is used as a Korean traditional medicine to treat gastric diseases. However, the active ingredients and pharmacological targets of A. rugosa are unknown. In this study, we aimed to reveal the pharmacological effects of A. rugosa on gastritis by combining a mice model and a network pharmacology method. The macrophage and gastritis-induced models were used to evaluate the pharmacological effects of A. rugosa. The results show that A. rugosa relieved mucosal damage induced by HCl/EtOH in vivo. Network analysis identified 99 components in A. rugosa; six components were selected through systematic screening, and five components were linked to 45 gastritis-related genes. The main components were acacetin and luteolin, and the identified core genes were AKT serine/threonine kinase 1 (AKT1), nuclear factor kappa B inhibitor alpha (NFKBIA), and mitogen-activated protein kinase-3 (MAPK3) etc. in this network. The network of components, target genes, protein–protein interactions, and the Kyoto Encyclopedia of Genes and Genomes (KEGG) pathway was closely connected with chemokines and with phosphoinositide 3-kinase-Akt (PI3K/AKT), tumor-necrosis-factor alpha (TNFα), mitogen-activated protein kinase, nuclear factor kappa B, and Toll-like receptor (TLR) pathways. In conclusion, A. rugosa exerts gastro-protective effects through a multi-compound and multi-pathway regulatory network and holds potential for treating inflammatory gastric diseases.