The Shugan Hewei recipe (SHR) is a well-recognized traditional Chinese medicine (TCM) prescription that has been shown to significantly improve chest pain, acid regurgitation, and the mood of GERD. Nonetheless, the underlying mechanisms remain unclear. In this study, the active compounds and targets of SHR were predicted using network pharmacology. Gene ontology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) analyses were utilized to explore the therapeutic mechanism of SHR. Combined with the drug target obtained from network pharmacology, the therapeutic effect and mechanism of SHR were observed. SHR’s main active compounds included quercetin, kaempferol, and luteolin. The core targets of SHR and GERD were TGF-β1, IL-1β, IL-4, CXCL10, MAPK1, MAPK3, CXCL8, IL-10, IL-2, and FOS, involving virus infection, inflammatory response, and body immunity. The core targets of SHR during the treatment of mental disorders were GABRA1, GABRA2, GABRA3, GABRA5, and GABRA6, involving synaptic transmission and transmembrane movement. Animal experiments revealed that SHR could repair the lower esophageal mucosa, mediate inflammatory factors, and GABA receptors and improve the behavior of rats. Overall, our results substantiate that SHR has huge prospects for widespread application in treating GERD subjects with anxiety and depression.