Pneumonia is a common clinical disease in the neonatal period and poses a serious risk to infant health. Therefore, the understanding of molecular mechanisms is of great importance for the development of methods for the rapid and accurate identification, classification and staging, and even disease diagnosis and therapy of pneumonia. In this study, a nontargeted metabonomic method was developed and applied for the analysis of serum samples collected from 20 cases in the pneumonia control group (PN) and 20 and 10 cases of pneumonia patients with metabolic acidosis (MA) and myocardial damage (MD), respectively, with the help of ultrahigh-performance liquid chromatography–high-resolution mass spectrometry (UPLC–HRMS). The results showed that compared with the pneumonia group, 23 and 21 differential metabolites were identified in pneumonia with two complications. They showed high sensitivity and specificity, with the area under the curve (ROC) of the receiver operating characteristic curve (ROC) larger than 0.7 for each differential molecule. There were 14 metabolites and three metabolic pathways of sphingolipid metabolism, porphyrin and chlorophyll metabolism, and glycerophospholipid metabolism existing in both groups of PN and MA, and PN and MD, all involving significant changes in pathways closely related to amino acid metabolism disorders, abnormal cell apoptosis, and inflammatory responses. These findings of molecular mechanisms should help a lot to fully understand and even treat the complications of pneumonia in infants.