Objective To summarize the clinical characteristics of pneumocystis pneumonia (PCP) secondary to interstitial lung disease (ILD) to improve the prophylaxis and management level of clinicians. Methods The clinical data of 50 patients with PCP secondary to ILD in the Department of Respiratory and Critical Care Medicine of Nanjing Drum Tower Hospital from January 2015 to December 2022 were collected. SPSS 26.0 software was used for statistical analysis. Results A total of 50 patients with PCP secondary to ILD were screened. Among the 50 patients, there were 23 males and 27 females, with a median age of 64 years old. Forty-eight cases (96%) had a history of glucocorticoid therapy with the median duration of 3 months; 31 (77.5%, 31/40) cases developed PCP in the first 6 months after glucocorticoid therapy; 34 cases had a history of glucocorticoid and immunosuppressants at the same time. None of the 50 ILD patients used drugs for PCP prophylaxis before developing PCP. The major clinical manifestations of PCP secondary to ILD were worse cough and shortness of breath or fever. Laboratory results showed 38 cases (76.0%) had peripheral blood total lymphocyte count <200/µL, 27 cases (54.0%) had CD4+ T cell count <200/µL, 34 cases (68.0%) had CD4+ T cell count <300/µL, 37 cases (74.0%) had CD3+ T cell count <750/µL, 34 cases (68.0%) had β-D-glucan test >200 pg/mL, 35 cases (70.0%) had lactic dehydrogenase > 350 U/L and 41 cases (82.0%) had type Ⅰ respiratory failure. High resolution computed tomography showed added ground-glass opacity and consolidation on the basis of the original ILD. Thirty-six cases were detected the Pneumocystis jirovecii by metagenomic next-generation sequencing with broncho-alveolar lavage fluid as the main source, and 2 cases by smear microscopy. All patients were treated with trimethoprim-sulfamethoxazole. After treatment, 29 cases were discharged with a better health condition, 10 cased died, and 11 cases left hospital voluntarily because of treatment failure or disease deterioration. Conclusions After the use of glucocorticoid and immunosuppressants, ILD patients are susceptible to life-threatening PCP. It is particularly important to make an early diagnosis. Attention should be paid to integrate the symptoms, levels of peripheral blood lymphocyte count, β-D-glucan test, lactic dehydrogenase and imaging findings to make an overall consideration. It is suggested to perform next-generation sequencing with broncho-alveolar lavage fluid at an early stage when patients can tolerate fiberoptic bronchoscopy to avoid misdiagnosis and missed diagnosis. ILD patients often develop PCP in the first 6 months after using glucocorticoid and immunosuppressants. During follow-up, peripheral blood CD4+ and CD3+ T cell count should regularly be monitored so as to timely prevent PCP.