We report a case of hospital-acquired Legionella pneumonia that was detected by metagenomic next-generation sequencing (mNGS) of blood from a 7-year-old girl after umbilical cord blood stem cell transplantation (UCBT) with myelodysplastic syndrome. UCBT is traditionally associated with an increased risk of infection, particularly during the first 3 months after transplantation. Controlling interstitial pneumonia and severe infection is the key to reducing patient mortality from infection. Legionella pneumophila can cause a mild cough to rapidly fatal pneumonia. After mNGS confirmed that the pathogen was L. pneumophila, azithromycin, cefoperazone sulbactam, and posaconazole were used for treatment, and the patient's temperature decreased and remained normal. The details of this case highlight the benefits of the timely use of metagenomic NGS to identify pathogens for the survival of immunocompromised patients.