Liver fibrosis is a chronic pathological process that various pathogenic factors lead to abnormal hyperplasia of hepatic connective tissue, and its main feature is the excessive deposition of extracellular matrix. However, there are currently no drugs approved for the treatment of liver fibrosis. Phillygenin (PHI), a lignan isolated from Forsythiae Fructus, showed potential anti-inflammatory and anti-fibrosis effects but the mechanisms remain unknown. In view of the vital role of gut microbiota in the development of liver fibrosis, this study aimed to explore whether PHI could protect intestinal epithelial barrier and attenuate liver fibrosis by maintaining the homeostasis of intestinal microbiota. Therefore, the liver fibrosis model was induced by intraperitoneal injection of olive oil containing 10% carbon tetrachloride (CCl4) for 4 weeks in C57BL/6J mice. Histological analysis including Hematoxylin-Eosin, Masson, Sirius red, and immunohistochemistry staining were carried out to detect the histopathology and collagen deposition of mice liver tissues. The biochemical indexes related to liver function (ALT, AST, AKP, γ-GT), fibrosis (HYP, HAase, LN, PC III, IV-C) and inflammation (TNF-α, MIP-1, LPS) were determined by specific commercial assay kits. In vivo experimental results showed that PHI could improve liver histopathological injury, abnormal liver function, collagen deposition, inflammation and fibrosis caused by CCl4. Moreover, PHI restored the intestinal epithelial barrier by promoting the expression of intestinal barrier markers, including ZO-1, Occludin and Claudin-1. More importantly, the corrective effect of PHI on the imbalance of gut microbiota was confirmed by sequencing of the 16 S rRNA gene. In particular, PHI treatment enriches the relative abundance of Lactobacillus, which is reported to alleviate inflammation and fibrosis of damaged liver. Collectively, PHI attenuates CCl4-induced liver fibrosis partly via modulating inflammation and gut microbiota.