The JiGuCao capsule formula (JCF) has demonstrated promising curative effects in treating chronic hepatitis B (CHB) in clinical trials. Here, we aimed to investigate JCF’s function and mechanism in diseases related to the hepatitis B virus (HBV). We used mass spectrometry (MS) to identify the active metabolites of JCF and established the HBV replication mouse model by hydrodynamically injecting HBV replication plasmids into the mice’s tail vein. Liposomes were used to transfect the plasmids into the cells. The CCK-8 kit identified cell viability. We detected the levels of HBV s antigen (HBsAg) and HBV e antigen (HBeAg) by the quantitative determination kits. qRT-PCR and Western blot were used to detect the genes’ expression. The key pathways and key genes related to JCF on CHB treatment were obtained by network pharmacological analysis. Our results showed that JCF accelerated the elimination of HBsAg in mice. JCF and its medicated serum inhibited HBV replication and proliferation of HBV-replicating hepatoma cellsin vitro. And the key targets of JCF in treating CHB were CASP3, CXCL8, EGFR, HSPA8, IL6, MDM2, MMP9, NR3C1, PTGS2, and VEGFA. Furthermore, these key targets were related to pathways in cancer, hepatitis B, microRNAs in cancer, PI3K-Akt signaling, and proteoglycans in cancer pathways. Finally, Cholic Acid, Deoxycholic Acid, and 3′, 4′, 7-Trihydroxyflavone were the main active metabolites of JCF that we obtained. JCF employed its active metabolites to perform an anti-HBV effect and prevent the development of HBV-related diseases.