Objective To discuss the etiological characteristics of patients with human immunodeficiency virus (HIV) / acquired immunodeficiency syndrome (AIDS) [collectively referred to as people living with HIV (PLWH)] complicated with pulmonary infection, and to evaluate the diagnostic value of metagenomic next-generation sequencing (mNGS) technology. Methods A retrospective study was conducted on 322 PLWH with pulmonary infection, whose clinical data and bronchoalveolar lavage fluid samples were collected. All samples underwent both conventional etiological tests [smear, culture, polymerase chain reaction (PCR)] and mNGS. The pathogen detection rates, reporting times, and detected etiological characteristics were compared between the two methods. Etiological variations under different CD4+ T lymphocyte levels were also analyzed. Results Among the 322 patients, 80.1% (258/322) were male, with a median age of 35 years. The median CD4+ T lymphocyte count was 61 (22, 205) cells/µL, and the median HIV RNA load was 1 343 (0, 159 423) copies/mL. mNGS was successfully performed on 294 patients, detecting a total of 93 pathogen species across 786 instances. Viruses were the predominant pathogens (34.4%, 32 species), with the most common being cytomegalovirus (CMV, 44.7%), Pneumocystis jirovecii (40.4%), Epstein-Barr virus (14.6%), Mycobacterium tuberculosis complex (11.2%), coronavirus disease 2019(COVID-19)(9.0%), and Aspergillus flavus/A. oryzae(8.7%). The overall sensitivity of conventional methods was 64%, with a statistically significant difference (P<0.001) compared to 91.0% for mNGS. The reporting time of mNGS was significantly shorter than of conventional methods. Patients at the AIDS stage, whose CD4+ T lymphocytes<200 cells/µL, had the highest total number of detected pathogens (648 instances). Conclusions Pulmonary infections in PLWH are primarily caused by CMV, P. jirovecii, M. tuberculosis complex, COVID-19, and Aspergillus species, with the etiological spectrum varying according to immune status. Patients with low CD4 counts are susceptible to opportunistic pathogens such as Pneumocystis jirovecii and CMV. As the CD4 count increases, viruses and fungi remain the predominant types of pathogens, but the proportion of bacterial detection relatively increases. mNGS can significantly improve the pathogen detection rate in PLWH with pulmonary infection.