BACKGROUND: Gastric cancer (GC) is marked by high incidence, malignancy, and poor prognosis. Understanding its development mechanisms and discovering effective drugs are urgent needs. Elevated oxidative stress levels in GC patients have been linked to disease progression. Berberine, an isoquinoline alkaloid from METHODS: Berberine's target genes were sourced from the Traditional Chinese Medicine Systems Pharmacology (TCMSP) and Comparative Toxicogenomics Database (CTD). GC-related targets were gathered from GeneCards, Online Mendelian Inheritance in Man (OMIM), PharmGkb, the Therapeutic Target Database (TTD), and DrugBank. The intersection of these targets facilitated the construction of a "drug-disease-target" network using Cytoscape 3.9.1. A protein-protein interaction (PPI) network was developed via the STRING database, and core targets were identified through visualization and topological analysis. Gene Ontology (GO) functional and Kyoto Encyclopedia of Genes and Genomes (KEGG) pathway enrichment analyses were performed using R. Subsequently, RESULTS: Network pharmacology analysis identified 281 targets for berberine and 8,953 targets related to GC, revealing 224 common targets. GO enrichment analysis encompassed 3,001 biological processes, with the top 10 including responses to external biotic stimuli, oxidative stress, nutrient levels, chemical stress, oxygen levels, and hypoxia. Additionally, 122 cellular components and 213 molecular functions were identified. KEGG pathway enrichment analysis indicated 176 related signaling pathways, with key pathways for berberine's anti-GC effects potentially including phosphatidylinositol 3-kinase (PI3K)/protein kinase B (AKT), forkhead box O (FOXO), and HIF-1. CONCLUSIONS: Regulation of oxidative stress may be one of the key mechanisms by which berberine inhibits the progression of gastric cancer.