We compared the prophylactic effect of trimethoprim-sulfamethoxazole (TMP-SMX) with atovaquone for pneumocystis pneumonia (PCP) in patients with connective tissue diseases (CTDs) receiving high-dose glucocorticoids. Patients with CTDs aged ≥ 18years who were treated with a prolonged course (≥ 4weeks) of glucocorticoids (≥ 20mg/day prednisone) in a Japanese tertiary center between 2013 and 2017 were included. The patients were categorized into two groups: TMP-SMX and atovaquone group. Adjusted cumulative incidence of PCP was compared between the two groups after propensity score weighting for differences in confounding factors. A total of 480 patients with a prolonged high-dose glucocorticoid treatment were identified. Out of 383 patients with TMP-SMX prophylaxis, 102 (26.8%) patients experienced adverse events leading to discontinuation within 4weeks of initiation, while no patient in the atovaquone discontinued the therapy. Two hundred eighty-one patients received TMP-SMX, while 107 received atovaquone for PCP prophylaxis. During a total of 397.0 person-years, 7 PCP cases (2 in the TMP-SMX, 5 in the atovaquone) occurred with a mortality rate of 54.5%. After adjusting for differences in baseline characteristics, the adjusted cumulative incidence of PCP was similar between the two group (HR 0.97, 95% CI 0.19-5.09, p = 0.97). Prophylactic effects for PCP in CTDs patients receiving prolonged high-dose glucocorticoids were similar between TMP-SMX and atovaquone. Atovaquone was well-tolerated with no side effects.