Introduction: Pneumocystis jirovecii pneumonia (PJP) is a common opportunistic infection. With the wide application of glucocorticosteroids and immunosuppressants, the incidence and mortality rates of PJP in connective tissue disease (CTD) patients with interstitial lung disease (ILD) are increasing. Methods: We retrospectively enrolled consecutive CTD-ILD patients with PJP in our center between January 2014 and December 2022. Cox regression models were constructed to explore prognostic factors in CTD-ILD-PJP patients. Results: There were 159 CTD-ILD patients [60 (51, 68) years, 61.0% female] with PJP, 78 (49.1%) of whom died. Compared with those in the CTD-non-ILD-PJP group, there were more pneumomediastinum cases (16.4% vs. 6.7%, p = 0.030) and significantly higher all-cause mortality rates (49.1% vs. 33.7%, p = 0.019) in the CTD-ILD-PJP group. Multivariate analysis indicated that IIM (HR = 2.635, 95% CI: 1.383–5.019), pneumomediastinum (HR = 2.877, 95% CI: 1.483–5.582), oral candidiasis infection (HR = 2.596, 95% CI: 1.229–5.483), aspergilli infection (HR = 2.886, 95% CI: 1.412–5.900), and lower minimal albumin (Alb) (HR = 0.872, 95% CI: 0.819–0.927) were independent risk factors associated with poor survival in CTD-ILD-PJP patients. Conclusions: CTD-ILD-PJP patients were mainly middle-aged females and had higher mortality rates than CTD-PJP patients without ILD. IIM, pneumomediastinum, oral candidiasis infection, aspergilli infection, and lower minimal Alb were independent risk factors associated with poor survival in CTD-ILD-PJP patients. Key Points• CTD-ILD-PJP patients had higher mortality rates than CTD-PJP patients without ILD.• IIM, pneumomediastinum, oral candidiasis infection, aspergilli infection, and lower minimal Alb were independent survival risk factors in CTD-ILD-PJP patients.• The study explored susceptibility and prognostic risk factors of CTD-ILD-PJP patients, to reduce the incidence and mortality.