Pulmonary fibrosis (PF) is a chronic, progressive, and fibrotic interstitial lung disease with a high mortality rate. Qi-Long-Tian (QLT) capsule is an herbal formula with great potential for antifibrotic effects, consisting of San Qi (Notoginseng Radix et Rhizoma), Di Long [Pheretima aspergillum (E. Perrier)], and Hong Jingtian (Rhodiolae Crenulatae Radix et Rhizoma), and has been used in clinical practice for many years. To explore the relationship between the effects of Qi-Long-Tian capsule and gut microbiota of PF mice, pulmonary fibrosis model were established by tracheal drip injection of bleomycin. Thirty-six mice were randomly divided into 6 groups: control group (control), model group (model), QLT capsule low dose group (QL), QLT capsule medium dose group (QM), QLT capsule high dose group (QH), and pirfenidone group (PFD). After 21days of treatment, after pulmonary function tests, the lung tissues, serums, and enterobacterial samples were collected for further analysis. HE staining and Masson's staining were used to detect changes as the main indicators of PF in each group, and the expression of hydroxyproline (HYP) related to collagen metabolism was detected by and alkaline hydrolysis method. qRT-PCR and ELISA were used to detect the mRNA and protein expressions of pro-inflammatory factors include interleukin 1β (IL-1β), interleukin 6 (IL-6), transforming growth factor β1 (TGF-β1), tumor necrosis factor α (TNF-α) in lung tissues and serums, and the inflammation-mediating factors include tight junction protein (ZO-1, Claudin, Occludin). ELISA was used to detect the protein expressions of secretory immunoglobulin A (sIgA), short-chain fatty acids (SCFAs), and lipopolysaccharide (LPS) in colonic tissues. 16sRNA gene sequencing was used to detect changes in the abundance and diversity of intestinal flora in the control, model, and QM groups, to search for differential genera, and analyze the correlation with inflammatory factors. QLT capsule effectively improved the status of pulmonary fibrosis and reduced HYP. In addition, QLT capsule significantly reduced the abnormal levels of pro-inflammatory factors, including IL-1β, IL-6, TNF-α, and TGF-β in lung tissue and serum, while improving the levels of pro-inflammatory related factors ZO-1, Claudin, Occludin, sIgA, SCFAs, and reducing LPS in the colon. The comparison between the alpha diversity and beta diversity in enterobacteria suggested that the composition of the gut flora in the control, model, and QLT capsule groups were different. QLT capsule significantly increased the relative abundance of Bacteroidia (which might limit the onset of inflammation) and decreased the relative abundance of Clostridia (which might promote inflammation). In addition, these two enterobacteria were closely associated with pro-inflammatory-related indicators and pro-inflammatory factors in PF. All these results suggest that QLT capsule intervenes in pulmonary fibrosis by regulating the differential genera of intestinal flora, increasing immunoglobulin secretion, repairing the intestinal mucosal barrier, reducing LPS entry into the blood, and decreasing inflammatory factor secretion in the serum, which in turn alleviates pulmonary inflammation. This study clarifies the therapeutic mechanism of QLT capsule in PF and provides a theoretical basis for it. It provides a theoretical basis for its further clinical application.