In the HIV-PCP group, serum albumin ≤30 g/L (AHR 9.93 95% CI 1.69–58.30, P = 0.01), and admission to ICU (AHR 72.26, 95% CI 11.76–443.87, P<0.001) were independently associated with all-cause mortality. Here, ALB is linked to pneumocystosis.