Objective To investigate the correlation between serum neutrophil extracellular traps (NETs) level and vitamin D level in children with pneumonia infected by different pathogens. Methods A total of 80 children with pneumonia were enrolled as the study group, and they were assigned to Mycoplasma pneumoniae infection group (n=40), influenza virus infection group (n=22), or Mycoplasma pneumoniae and influenza virus infection group (mixed infection group, n=18) according to pathogen type. In addition, healthy children were selected as the control group (n=20). General data and test results of inflammatory indices were collected for each group. Serum levels of 25‑hydroxy vitamin D₃ (25[OH]D₃), myeloperoxidase‑DNA complex (MPO‑DNA), and cell‑free DNA (cf‑DNA) were measured in various groups. Correlation between serum MPO‑DNA, cf‑DNA, and 25(OH)D₃ levels were evaluated. Results The mixed infection group exhibited longer fever duration and total disease course, as well as higher white blood cell counts (WBC), neutrophil percentage (NE%), and serum C‑reactive protein (CRP) and interleukin (IL)‑6 levels as compared with the Mycoplasma pneumoniae infection group and the influenza virus infection group, whereas the Mycoplasma pneumoniae infection group interpreted longer or higher indices as above as compared with the influenza virus infection group (P<0.05). WBC, NE%, and serum levels of CRP, and IL‑6 of the Mycoplasma pneumoniae infection group, the influenza virus infection group, and the mixed infection group were higher than those of the control group (P<0.05). Serum 25(OH)D₃ level of the Mycoplasma pneumoniae infection group, the influenza virus infection group, and the mixed infection group was lower than that of the control group; moreover, the mixed infection group depicted a lower serum 25(OH)D₃ level as compared with the Mycoplasma pneumoniae infection group and the influenza virus infection group, and the Mycoplasma pneumoniae infection group expressed a lower serum 25(OH)D₃ level as compared with the influenza virus infection group (P<0.05). Serum cf‑DNA and MPO‑DNA levels of the Mycoplasma pneumoniae infection group, the influenza virus infection group, and the mixed infection group were higher than those of the control group; furthermore, the mixed infection group yielded higher serum cf‑DNA and MPO‑DNA levels as compared with the Mycoplasma pneumoniae infection and influenza virus infection groups, as well as the Mycoplasma pneumoniae infection group indicated a higher serum cf‑DNA level as compared with the influenza virus infection group, and the influenza virus infection group had a higher serum MPO‑DNA level than the Mycoplasma pneumoniae infection group (P<0.05). Correlation analysis results revealed that serum cf‑DNA and MPO‑DNA levels negatively correlated with serum 25(OH)D₃ level in the study group, and this negative correlation was also observed in the Mycoplasma pneumoniae infection and mixed infection groups (P<0.05), but no correlation between serum cf⁃DNA and MPO⁃DNA levels was observed in the influenza virus infection group (P>0.05). Conclusion Serum MPO‑DNA and cf‑DNA levels negatively correlate with serum 25(OH)D₃ level in children with Mycoplasma pneumoniae pneumonia, suggesting that vitamin D may play a regulatory role in the immune response in Mycoplasma pneumoniae pneumonia.