Hepatitis B virus (HBV) poses a significant global health challenge, potentially leading to severe liver conditions, with currently limited effective treatment options available. Xiao-Chai-Hu-Tang (XCHT), a well-known Traditional Chinese Medicine (TCM) prescription, shows promise in clinical trials for treating HBV. Therefore, screening the complex components of XCHT, identifying the active compounds, and closely exploring the targets associated with hepatitis B may constitute an effective strategy for the development of new therapeutic drugs for the treatment of this disease. A systematic pharmacology and GEO chip analysis identified key targets and pathways for hepatitis B treatment and effective ingredients. Molecular docking and molecular dynamics simulation techniques were used to explore the affinity and stability of active compounds with core targets, while assessing the druggability and safety of the active compounds. The therapeutic effect of the active compound protoporphyrin in XCHT on hepatitis B were mediated through key targets such as AKT1, MAPK1, and LCK, as well as key signaling pathways like PI3K-Akt signaling pathway and Ras signaling pathway. Protoporphyrin effectively bond to active pockets of core targets and demonstrated favorable druggability and a high safety threshold. The study provided valuable insights into the development of effective treatments for hepatitis B.