Objective To explore the mechanism of ginsenoside Rh2 against hepatocellular carcinoma (HCC) based on network pharmacology and molecular docking technique. Methods Effect targets of ginsenoside Rh2 were retrieved from the databases such as Traditional Chinese Medicine Systems Pharmacology Database and Analysis Platform, and PharmMapper. HCC⁃related targets were searched in the GeneCards® and OMIM® databases. Intersection targets were obtained using the Venny online tool. Based on these intersection targets, a protein⁃protein interaction (PPI) network was constructed using the STRING database, and core targets were screened through topological analysis. Enrichment analysis of intersection targets was performed using the DAVID database. Molecular docking between ginsenoside Rh2 and the core targets was conducted using AutoDockTools and PyMOL software. Results A total of 252 effect targets for ginsenoside Rh2 and 1566 targets related to HCC were screened, resulting in 91 intersection targets. Core targets included Caspase⁃3 (CASP3), tumor necrosis factor (TNF), prostaglandin⁃endoperoxide synthase 2 (PTGS2), signal transducer and activator of transcription 3, epidermal growth factor receptor, and albumin. Enrichment analysis results revealed that the intersection targets were enriched in cellular components such as cytosol, nucleus, and cytoplasm. They were primarily involved in molecular functions including protein binding, adenosine triphosphate binding, and protein kinase activity, as well as biological processes such as cell signal transduction and phosphorylation. These targets were closely associated with pathways including pathways in cancer, mitogen⁃activated protein kinase (MAPK) signaling pathway, and phosphatidylinositol 3⁃kinase/protein kinase B (PI3K⁃AKT) signaling pathway. Molecular docking results indicated that the binding energies between ginsenoside Rh2 and CASP3, TNF, and PTGS2 were all ≤-7 kcal/mol. Conclusion Ginsenoside Rh2 may exert anti⁃HCC effects by regulating targets such as CASP3, TNF, and PTGS2, thereby intervening in pathways including pathways in cancer, MAPK signaling pathway, and PI3K⁃AKT signaling pathway.