Early targeted antibiotic therapy is crucial for improving the prognosis of immunocompromised patients with severe respiratory infections (SRIs) in the intensive care unit (ICU). Metagenomic next-generation sequencing (mNGS) has shown significant value in pathogen detection, but research on lower respiratory tract microorganisms remains limited. This study enrolled 234 patients with SRIs in the ICU, and individuals were categorized into immunocompromised and immunocompetent groups. We compared the diagnostic performance of mNGS using bronchoalveolar lavage fluid (BALF) with conventional microbiological tests (CMTs) and analyzed the value of mNGS in immunocompromised patients with SRIs in the ICU. Among all patients, the pathogenic microorganism detection rate of mNGS was higher than that of CMTs (94.02% vs 66.67%, P < 0.05), both in the immunocompromised group (95.0% vs 58.75%, P < 0.05) and the immunocompetent group (93.51% vs 71.43%, P < 0.05). mNGS detected more pathogens than CMTs did (167 vs 51), identifying 116 organisms that were missed by CMTs. The proportion of antibiotic regimen adjustments based on mNGS results was significantly higher compared to CMTs in both the immunocompromised (70.00% vs 17.50%, P < 0.05) and immunocompetent groups (48.70% vs 15.58%, P < 0.05). In the immunocompromised group, patients who had their antibiotic treatment adjusted on mNGS results had improved prognosis, with significantly lower ICU mortality (8.93% vs 50%, P < 0.05) and 28-day mortality rates (30.36% vs 68.75%, P < 0.05) than CMTs. In the immunocompetent group, no statistically significant differences were observed in ICU mortality or 28-day mortality (20.00% vs 33.33%, P > 0.05; 42.67% vs 45.83%, P > 0.05). mNGS shows significant value in detecting pathogens in immunocompromised patients with SRIs in ICU. For immunocompromised patients who respond poorly to empirical treatment, mNGS can provide an etiological basis, helping adjust antibiotic regimens more precisely and thereby improving patient prognosis.