Inflammation is the predominant characteristic of pneumonia. The present study aimed to to identify a faster and more reliable novel inflammatory marker for the diagnosis of pneumonia. The expression of the S100A12 gene was analyzed by reverse transcription quantitative polymerase chain reaction in samples obtained from 46 patients with bacterial pneumonia and other infections, compared with samples from 20 healthy individuals, using the 2‑ΔΔCt method. The expression levels of S100A12 were increased in 12 patients with bacterial pneumonia. Compared with clinical inflammatory data, a positive correlation was observed between the expression of the S100A12 gene and levels of white blood cells, C‑reactive protein (CRP), thrombocytocrit, neutrophils, erythrocyte sedimentation and soterocytes, and an inverse correlation was observed with the width of red blood cell volume distribution and platelet distribution, monocytes and hemoglobin, using Pearson's product‑moment correlation method. The P‑value of CRP and erythrocyte sedimentation were revealed to be statistically significant (P<0.05). A sporadic distribution of S100A12 was observed in a heatmap among the patients with different infections and bacterial pneumonia. Furthermore, the expression of S100A12 occurred in parallel to the number of clumps of inflamed tissue observed in chest computed tomography and X‑ray. The value of gene expression of S100A12 (>1.0) determined using the 2‑ΔΔCt method was associated with more severe respiratory diseases in the patients compromised by bacterial pneumonia, sepsis and pancreatitis. These findings suggested that S100A12 is an effective marker for inflammatory diseases.