Nonalcoholic fatty liver disease (NAFLD) is the leading cause of liver disease worldwide. Nonalcoholic steatohepatitis (NASH) is an advanced form of NAFLD. The livers of patients with NASH are more likely to develop fibrosis. Xiaoyao San (XYS) is a classic traditional Chinese medicine (TCM) formula that has been widely used in treating liver diseases. In this study, we elucidated the effects and mechanism of XYS in treating NASH-related liver fibrosis by combining high-throughput sequencing-based high-throughput screening with network pharmacology analysis. Our work revealed that XYS may play a role in preventing NASH-related liver fibrosis by regulating biological functions related to the extracellular matrix (ECM), inflammation, and metabolism. Additionally, Bupleuri Radix, Poria, Zingiberis Rhizoma Recens, and Paeoniae Radix Alba are the key herbs of XYS that could partially represent the functions of XYS. These regulatory effects are mediated by targeting signal transducer and activator of transcription 3 (STAT3), nuclear factor kappa B (NFκB), and peroxisome proliferator-activated receptor gamma (PPARγ) signaling. Narcissin, casuarictin, and γ-sitosterol were identified as representative active compounds in XYS targeting STAT3, NFκB, and PPARγ, respectively. Taken together, our findings provide a novel strategy for investigating the pharmacological effects and biological mechanisms of a TCM formula.