This study was aimed at elucidating the potential mechanisms of quercetin in the treatment of gastric cancer (GC). A network pharmacology approach was used to analyze the targets and pathways of quercetin in treating GC. The predicted targets of quercetin against GC were obtained through database mining, and the correlation of these targets with GC was analyzed by Gene Ontology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) pathway enrichment analyses. Next, the protein-protein interaction (PPI) network was constructed, and overall survival (OS) analysis of hub targets was performed using the Kaplan–Meier Plotter online tool. Finally, the mechanism was further analyzed via molecular docking of quercetin with the hub targets. Thirty-six quercetin-related genes were identified, 15 of which overlapped with GC-related targets. These targets were further mapped to 319 GO biological process terms and 10 remarkable pathways. In the PPI network analysis, six hub targets were identified, including AKT1, EGFR, SRC, IGF1R, PTK2, and KDR. The high expression of these targets was related to poor OS in GC patients. Molecular docking analysis confirmed that quercetin can bind to these hub targets. In conclusion, this study provided a novel approach to reveal the therapeutic mechanisms of quercetin on GC, which will ease the future clinical application of quercetin in the treatment of GC.