Background: Pirfenidone is the first antifibrotic drug approved for the treatment of idiopathic pulmonary fibrosis (IPF) and it is used in the treatment of other interstitial pneumonias, such as unclassifiable interstitial lung disease (ILD) and connective tissue-related ILD. This study examined the efficacy of pirfenidone in patients with IPF and fibrotic idiopathic non-specific interstitial pneumonia (f-iNSIP). Methods: In a retrospective real-life study, 67 IPF and 24 f-iNSIP patients were enrolled and classified into a pirfenidone group and a non-antifibrotic group. The level of forced vital capacity (FVC) and diffusing capacity of lung for carbon monoxide (DLco) at baseline, 6, 12 and 24 months were recorded. The level of KL-6 in serum was detected by chemiluminescence enzyme immunoassay (CLEIA). The prognosis and safety outcomes were collected from patients. Results: In IPF patients, pirfenidone decreased the mean change of FVC and DLco, and decreased the proportion of patients with a ⩾10% decline in FVC or a ⩾15% decline in DLco compared with the non-antifibrotic group. There was no difference in the mean change of FVC and DLco between smokers and non-smokers who received pirfenidone treatment. There was an improvement in progression-free survival, defined as the time to the first occurrence of acute exacerbation or death related to pulmonary fibrosis. Moreover, the ratio of patients who experienced acute exacerbation and death related to pulmonary fibrosis was lower in the pirfenidone group. There was no change in lung function and prognosis between the pirfenidone and non-antifibrotic groups in f-iNSIP patients. The KL-6 level slightly decreased after 1 year of pirfenidone treatment but not significantly. Gastrointestinal and skin-related adverse events were most common, and four patients ceased treatment due to the side effects. Conclusions: Pirfenidone safely reduced disease progression by improving the lung function and progression-free survival in IPF patients, with acceptable side effects. The efficacy of pirfenidone on f-iNSIP was not significant, suggesting the need for further studies. The reviews of this paper are available via the supplemental material section.