Mycoplasma pneumoniae (MP), the causative agent of MP pneumonia (MPP), has posed a substantial burden to public health owing to a lack of rapid and effective diagnostic methods. Here, we designed a loop-mediated isothermal amplification (LAMP)-based assay, termed LAMP, combined with a nanoparticle-based lateral flow biosensor (LAMP-LFB) for rapid and sensitive diagnosis of MP.-LAMP-LFB included a set of six primers targeting the community-acquired respiratory distress syndrome (CARDS) toxin gene and was performed optimally at 63°C for only 30 min. The resulting LAMP products could be visually indicated by LFB within 2 min, thus the whole process could be accomplished within an hour. MP-LAMP-LFB’s sensitivity was 50 fg per reaction, which was in complete accordance with these results obtained from real-time turbidity and visual detection reagent (VDR). MP-LAMP-LFB had no cross-reactivity with other pathogens that had similar clinical presentations. Our assay was further validated using 100 nasopharyngeal swab samples collected from children suspected of MPP, and the result was compared with the real-time PCR method. With a positive rate of 50%, the data indicated that MP-LAMP-LFB is a sensitive test for MP detection in clinical settings. Collectively, the MP-LAMP-LFB assay targeting the CARDS toxin gene was a rapid, highly sensitive, and specific test that could be widely applied in point-of-care settings and basic medical facilities in rural areas.