Objective To explore the relation between serum nucleotide⁃binding oligomeric domain⁃like receptor 2 (NOD2)/receptor⁃interacting protein 2 (RIP2)/nuclear factor kappa B (NF⁃κB) mRNA expressions and degree of pulmonary injury in patients with Mycoplasma pneumoniae pneumonia, as well as the predictive value on their prognosis. Methods A total of 117 patients with Mycoplasma pneumoniae pneumonia were selected as the research subjects, and they were assigned to mild to moderate group (n=82) or severe group (n=35) according to their degree of pulmonary injury. The mRNA expressions of serum NOD2, RIP2, and NF⁃κB were compared between the two groups. The correlation between the mRNA expressions of serum NOD2, RIP2, and NF⁃κB and degree of pulmonary injury in patients with Mycoplasma pneumoniae pneumonia was identified by employing Pearson correlation analysis. After 6⁃month follow⁃up, patients were assigned to poor prognosis group (n=41) or favorable prognosis group (n=76) according to the prognostic status. The mRNA expressions of serum NOD2, RIP2, and NF⁃κB and clinical data were compared between the poor prognosis group and the favorable prognosis group. The influencing factors for poor prognosis in patients with Mycoplasma pneumoniae pneumonia were identified by using multivariate Logistic regression model. The mRNA expressions of serum NOD2, RIP2, and NF⁃κB for alone and jointly predicting the values of poor prognosis in patients with Mycoplasma pneumoniae pneumonia were evaluated by employing receiver operating characteristic (ROC) curve. Results The mRNA expressions of serum NOD2, RIP2, and NF⁃κB in the severe group were higher than those in the mild to moderate group (P<0.05). The mRNA expressions of serum NOD2, RIP2, and NF⁃κB positively correlated with score of pulmonary injury (P<0.05). The results of multivariate Logistic regression analysis revealed that severe pulmonary injury, high expression of serum NOD2 mRNA, high expression of serum RIP2 mRNA, high expression of NF⁃κB serum mRNA were the risk factors for poor prognosis in patients with Mycoplasma pneumoniae pneumonia (P<0.05). The results of ROC curve analysis indicated that the areas under the curve (AUC) of the mRNA expressions of serum NOD2, RIP2, and NF⁃κB for alone and jointly predicting poor prognosis in patients with Mycoplasma pneumoniae pneumonia were 0.799, 0.844, 0.796, and 0.914, respectively (P<0.05), and AUC of the three⁃combined prediction was larger than that of the single prediction (P<0.05). Conclusion The mRNA expressions of serum NOD2, RIP2, and NF⁃κB positively correlate with degree of pulmonary injury in patients with Mycoplasma pneumoniae pneumonia. Both three as above are the influencing factors for poor prognosis in patients with Mycoplasma pneumoniae pneumonia. All the three indicators have certain predictive efficiency for the prognosis of patients, and the combined prediction efficiency of the three indicators is superior.