Objective: To analyze the drug-resistant gene loci of Mycoplasma pneumoniae (MP) using metagenomic next-generation sequencing (mNGS). Methods: From November 2022 to October 2023, 697 clinical samples (including sputum, alveolar lavage fluid and blood) of 686 children with Mycoplasma pneumoniae positive detected by mNGS were retrospectively analyzed. Samples were divided into intensive care unit (ICU) group and non-ICU group, Chi-square test was used to compare groups, and Mann-Kendall trend test was used to analyze the change trend of the detection rate of drug resistance gene loci over time. Results: Of the 697 samples, 164 were from the ICU group and 533 were from the non-ICU group. The detection rate of Mycoplasma pneumoniae resistance gene was 44.3% (309/697), and all detected drug-resistant gene loci of MP were A2063G. The detection rate of Mycoplasma pneumoniae in ICU group was 50.0% (82/164), and the detection rates of Mycoplasma pneumoniae resistance gene loci in sputum, alveolus lavage fluid and blood samples were 75.0% (18/24) and 48.4% (62/128), respectively. The detection rate in sputum was higher than alveolus lavage fluid samples (χ2=5.72,P=0.017). The detection rate of Mycoplasma pneumoniae in non-ICU group was 42.6% (227/533), the detection rate of Mycoplasma pneumoniae resistance gene loci in sputum and alveolar lavage fluid was 40.0% (16/40), 44.3% (201/454), and no detection rate in blood samples (0/12). There was no significant difference in the detection rate of alveolar lavage fluid and sputum (χ2=0.27, P=0.602). From November 2022 to October 2023, the detection rate of submitted samples showed an increasing trend month by month (overall: Z=3.99, ICU inspection group: Z=2.93, non-ICU group: Z=3.01, all P<0.01). Among the bacteria commonly detected with Mycoplasma pneumoniae, Streptococcus pneumoniae accounted for the highest proportion, the detection rate was 15.5% (108/697), and Epstein-Barr virus accounted for the highest proportion of 17.6% (123/697). Conclusions: From November 2022 to October 2023, the detection rate of Mycoplasma pneumoniae drug resistance gene loci showed an increasing trend. The detection rate of drug resistance gene loci in sputum samples of ICU group was higher than alveolus lavage fluid. No new drug resistance site were detected.