COVID-19 is a kind of pneumonia with new coronavirus infection, and the risk of death in COVID-19 patients with diabetes is four times higher than that in healthy people. It is unclear whether there is a difference in chest CT images between type 2 diabetes mellitus (T2DM) and non-diabetes mellitus (NDM) COVID-19 patients. The aim of this study was to investigate the differences in chest CT images between T2DM and NDM patients with COVID-19 based on a quantitative method of artificial intelligence. A total of 62 patients with COVID-19 pneumonia were retrospectively enrolled and divided into group A (T2DM COVID-19 pneumonia group, n = 15) and group B (NDM COVID-19 pneumonia group, n = 47). The clinical and laboratory examination information of the two groups was collected. Quantitative features (volume of consolidation shadows and ground glass shadows, proportion of consolidation shadow (or ground glass shadow) to lobe volume, total volume, total proportion, and number) of chest spiral CT images were extracted using Dr. Wise @Pneumonia software. The results showed that among the 26 CT image features, the total volume and proportion of bilateral pulmonary consolidation shadow in group A were larger than those in group B (P=0.031 and 0.019, respectively); there was no significant difference in the total volume and proportion of bilateral pulmonary ground glass density shadow between the two groups (P > 0.05). In group A, the blood glucose level was correlated with the volume of consolidation shadow and the proportion of consolidation shadow to right middle lobe volume, and higher than those patients in group B. In conclusion, the inflammatory exudation in the lung of COVID-19 patients with diabetes is more serious than that of patients without diabetes based on the quantitative method of artificial intelligence. Moreover, the blood glucose level is positively correlated with pulmonary inflammatory exudation in COVID-19 patients.