Hepatocellular carcinoma (HCC) is a prevalent and life-threatening form of cancer, with Shelian Capsule (SLC), a traditional Chinese medicine (TCM) formulation, being recommended for clinical treatment. However, the mechanisms underlying its efficacy remain elusive. This study sought to uncover the potential mechanisms of SLC in HCC treatment using bioinformatics methods. Bioactive components of SLC were obtained from the Traditional Chinese Medicine Systems Pharmacology Database and Analysis Platform (TCMSP), and HCC-related microarray chip data were sourced from the Gene Expression Omnibus (GEO) database. The selection criteria for components included OB ≧ 30% and DL ≧ 0.18. By integrating the results of differential expression analysis and weighted gene co-expression network analysis (WGCNA), disease-related genes were identified. Therapeutic targets were determined as shared items between candidate targets and disease genes. Protein-protein interaction (PPI) network analysis was conducted for concatenated genes, with core protein clusters identified using the MCODE plugin. Machine learning algorithms were applied to identify signature genes within therapeutic targets. Subsequently, immune cell infiltration analysis, single-cell RNA sequencing (sc-RNA seq) analysis, molecular docking, and ADME analysis were performed for the screened genes. A total of 153 SLC ingredients and 170 candidate targets were identified, along with 494 HCCrelated disease genes. Overlapping items between disease genes and drug candidates represented therapeutic genes, and PPI network analysis was conducted using concatenated genes. MCODE1 and MCODE2 cluster genes underwent Disease Ontology (DO), Gene Ontology (GO), and Kyoto Encyclopedia of Genes and Genomes (KEGG) enrichment analyses. Four signature genes (TOP2A, CYP1A2, CYP2B6, and IGFBP3) were identified from 28 therapeutic genes using 3 machine learning algorithms, with ROC curves plotted. Molecular docking validated the interaction modes and binding abilities between signature genes and corresponding compounds, with free binding energy all <-7 kcal/mol. Finally, ADME analysis revealed similarities between certain SLC components and the clinical drugs Sorafenib and Lenvatinib. In summary, our study revealed that the mechanism underlying the anti-HCC effects of SLC involves interactions at three levels: components (quercetin, beta-sitosterol, kaempferol, baicalein, stigmasterol, and luteolin), pathways (PI3K-Akt signaling pathway, TNF signaling pathway, and IL-17 signaling pathway), and targets (TOP2A, CYP1A2, CYP2B6, and IGFBP3). This study provides preliminary insights into the potential pharmacological mechanisms of SLC in HCC treatment, aiming to support its clinical application and serve as a reference for future laboratory investigations.