To investigate the therapeutic effect and mechanism of Qingfei oral liquid in idiopathic pulmonary fibrosis. Seventy-two male SD rats were divided into control group, model group, pirofenidone group and Qingfei group with 18 animals in each group. The idiopathic pulmonary fibrosis was induced in last three groups by intratracheal injection of bleomycin; pirofenidone group was given oral administration of pirofenidone b.i.d for 21 d, and Qingfei group was given Qingfei oral liquid 3.6 mL/kg q.d for Lung tissues were obtained for HE staining, Masson staining and transforming growth factor (TGF)-β immunohistochemical staining. Superoxide dismutase (SOD), malondialdehyde (MDA) and glutathione (GSH) were detected in tissue homogenates. The BATMAN-TCM database was used to retrieve the chemical components and their corresponding targets of Qingfei oral solution by network pharmacology method, and then the component-target-disease network diagram was constructed. Finally, the pathway enrichment analysis was carried out to explore the molecular mechanism of Qingfei oral liquid against idiopathic fibrosis. Histopathology results showed that Qingfei oral liquid had a similar relieving effect on pulmonary fibrosis as the positive drug pirfenidone; TGF-β secretion had a significant reduction in lung tissues of Qingfei group; and Qingfei oral liquid had better regulatory effect on SOD, MDA and GSH than pirfenidone. The results of component-target-disease network and pathway enrichment analysis showed that the related molecular pathways were concentrated in inflammation, extracellular matrix and cytokines. Qingfei oral liquid has a good therapeutic effect on idiopathic pulmonary fibrosis in rats via regulation of inflammation, extracellular matrix and cytokines.