People with diabetes have higher risks of various infections. Therefore, these diabetic patients might be at increased risk of COVID-19 and have a poorer prognosis. Up until now, little is known about critical role in the pathogenesis. This study aims to investigate the clinical characteristics of COVID-19 patients with diabetes and secondary hyperglycemia, as well as to explore the purported mechanisms. 80 confirmed COVID-19 subjects were classified into the euglycemia group, secondary hyperglycemia group, and diabetes group. Severity of COVID-19 was defined based on the diagnostic and treatment guideline for SARS-CoV-2 issued by Chinese National Health Committee. According to the severity of the disease, patients of the mild type and common type were registered as mild cases (patients with minimal symptoms and negative CT findings), while patients of the severe type and critical type were enrolled as severe cases (patients with positive CT findings and different extent of clinical manifestations). Patients in the diabetes group were older than those in the euglycemia group, and most of them were male. In the diabetes group, the proportion of severe cases was 57.14%, which was significantly higher than those in the other two groups, and 32% of the COVID-19 patients diagnosed as severe cases were with diabetes. The CD4+ cell counts in the diabetes group were lower than those in the other two groups, while the levels of LDH and hs-CRP were higher. Compared with the euglycemia group, the CD3+ cell counts and the CD4+/CD8+ ratio were decreased, whereas the levels of IL-6 were increased in the secondary hyperglycemia group and diabetes group, with the diversities in the diabetes group being especially more significant. The Spearman correlation analysis revealed that the presence of diabetes was positively correlated with age, hs-CRP, LDH, IL-6, CD8+ cells, and severity of COVID-19 and negatively correlated with CD3+ cell counts, CD4+ cell counts, and CD4+/CD8+ ratio. Compared with the other two groups, the diabetes group exhibited more diverse and multifocal features in CT imagings. Diabetes is a risk factor for influence of the progression and prognosis of COVID-19 due to ongoing inflammation and impaired immune response.