Objective To investigate the colonization, risk factors and prognosis of Pneumocystis jirovecii (P.jirovecii) colonization in patients with Pulmonary alveolar proteinosis (PAP). Methods The patients with Pulmonary alveolar proteinosis who were admitted to the Department of Respiratory and Critical Care Medicine, Nanjing Drum Tower Hospital from March 2019 to December 2022 were retrospectively analyzed. Polymerase chain reaction/next-generation metagenomic sequencing were used to detect the colonization of P. jirovecii in bronchoalveolar lavage fluid, and then to investigate the colonization rate, risk factors and outcome of P. jirovecii in PAP patients. Results A total of 25 patients were included in the study, of which 7 were colonized by P. jirovecii (28.0%). The rate of using antibiotics before admission in the colonizing group was significantly higher than that in the non-colonizing group (85.7% vs 33.3%, P=0.030). Total blood lymphocytes (1.4×109/L vs. 1.8×109/L, P=0.048), CD3+T cells (0.83×109/L vs. 1.34×109/L, P=0.010), CD4+T cells (0.48×109/L vs. 0.85×109/L, P=0.010) were significantly lower than those in the non-colonizing group, lactate dehydrogenase (469.9 U/L vs. 277.3 U/L, P=0.005) was significantly higher than those in the non-colonizing group. A higher proportion of colonizing group required combination therapy (57.1% vs. 11.1%, P=0.032); but there was no significant difference in the percentage of whole-lung ground-glass opacification, lung function, oxygen index and outcome. Lactate dehydrogenase was positively correlated with the percentage of whole-lung ground-glass opacification of PAP, but negatively correlated with oxygen index, percentage of predicted forced vital capacity and percentage of predicted diffusion capacity for carbon monoxide. Conclusions The colonization rate of P. jirovecii in PAP patients was high. Reduced lymphocyte count in peripheral blood of PAP patients and antibiotic use before diagnosing were risk factors for P. jirovecii colonization.