Background: To explore the effect and mechanism of pirfenidone in inhibiting pulmonary fibrosis in connective tissue disease-associated interstitial lung disease (CTD-ILD). Methods: From 2018 to 2020, 50 CTD-ILD patients were enrolled in the clinical study. Based on whether pirfenidone was used during treatment, patients were enrolled into the pirfenidone group and the control group. Pulmonary function tests were compared before and after treatment. Enzyme-linked immunosorbent assay (ELISA) was performed to detect the expression of tumor necrosis factor-α (TNF-α), signal transducer and activator of transcription 3 (STAT3), and Krebs Von den Lungen-6 (KL-6) in venous blood before and after treatment. Rat type II (RLE-6TN) lung epithelial cells were cultivated for in vitro experiments, and they were sorted into the control group, bleomycin group, pirfenidone group, TNF-α group, Stattic group, and TNF-α/Stattic combined treatment group. For the in vitro experiments, 3-(4,5-dimethylthiazol-2-yl)-2,5diphenyltetrazolium bromide (MTT) tests were used to evaluate cell proliferation, Reverse Transcription-Polymerase Chain Reaction(RT-PCR) was performed to detect STAT3 and KL-6 mRNA expression levels, ELISA was utilized to detect TNF-α and E-cadherin expression levels, and Western blotting (WB) was performed to determine α-smooth muscle actin (α-SMA), vimentin, TNF-α, STAT3, phosphorylated signal transducer and activator of transcription 3 (PSTAT3) and KL-6 expression.Results: In the clinical study, the pulmonary function indices including forced expiratory volume in one second (FEV1), forced vital capacity (FVC), FEV1/FVC, peak expiratory flow (PEF) and partial pressure (PaO 2 ) of the patients in the study group were superior to those in the control group (P<0.05). The serum TNF-α, STAT3 and KL-6 levels in the study group were significantly lower than those in the control group (P<0.05). In the in vitro experiments, the α-SMA, vimentin, STAT3 and KL-6 levels in the treatment group were significantly lower than those in the bleomycin group (P<0.05). Compared with those in the pirfenidone group, the α-SMA, vimentin, STAT3 and KL-6 levels in the TNF-α-treated group were significantly upregulated (P<0.05). Meanwhile, cell viability was further upregulated (P<0.05), and the expression of STAT3 and KL-6 was further decreased in the Stattic-treated group (P<0.05). In the group treated with infliximab combined with Stattic, TNF-α expression was significantly increased (P<0.05), cell activity was significantly restored (P<0.05), and the STAT3, KL-6 and E-cadherin expression levels were inhibited (P<0.05).Conclusions: Pirfenidone improved pulmonary function 1 and decreased TNF-α, STAT3, and KL-6 expression in CTD-ILD patients. Moreover, pirfenidone inhibits cell fibrosis through the TNF-α/STAT3/ Mucin 1(MUC1) pathway.