To explore the clinical utility and optimal timing of metagenomic next-generation sequencing (mNGS) in diagnosing pathogens in patients with diabetes complicated by community-acquired pneumonia (CAP). The study included 50 hospitalized patients diagnosed with diabetes complicated by CAP who underwent conventional microbiological testing (CMT) and mNGS using bronchoalveolar lavage fluid. Among the 50 cases, 16% presented no respiratory symptoms. There were significant increases in inflammatory markers such as C-reactive protein, erythrocyte sedimentation rate, and interleukin-6, with patchy imaging changes being the most prevalent. The positive rates for pathogen detection by mNGS and CMTs were 78 and 21% (