BACKGROUND: Coronavirus disease 2019 (COVID-19) is an emerging infectious disease that first appeared in Wuhan, China, and quickly spread throughout the world. We aimed to understand the relationship between diabetes mellitus and the prognosis of COVID-19. METHODS: Demographic, clinical, laboratory, radiologic, treatments, complications, and clinical outcomes data were extracted from electronic medical records and compared between diabetes (n = 84) and nondiabetes (n = 500) groups. Kaplan-Meier method and multivariate Cox analysis were applied to determine the risk factors for the prognosis of COVID-19. RESULTS: Compared with nondiabetic patients, diabetic patients had higher levels of neutrophils (P = .014), C-reactive protein (P = .008), procalcitonin (P < .01), and D-dimer (P = .033), and lower levels of lymphocytes (P = .032) and albumin (P = .035). Furthermore, diabetic patients had a significantly higher incidence of bilateral pneumonia (86.9%, P = .020). In terms of complications and clinical outcomes, the incidence of respiratory failure (36.9% vs 24.2%, P = .022), acute cardiac injury (47.4% vs 21.2%, P < .01), and death (20.2% vs 8.0%, P = .001) in the diabetes group was significantly higher than that in the nondiabetes group. Kaplan-Meier survival curve showed that COVID-19 patients with diabetes had a shorter overall survival time. Multivariate Cox analysis indicated that diabetes (hazard ratio 2.180, P = .031) was an independent risk factor for COVID-19 prognosis. In subgroup analysis, we divided diabetic patients into insulin-required and non-insulin-required groups according to whether they needed insulin, and found that diabetic patients requiring insulin may have a higher risk of disease progression and worse prognosis after the infection of severe acute respiratory syndrome coronavirus 2. CONCLUSIONS: Diabetes is an independent risk factor for the prognosis of COVID-19. More attention should be paid to the prevention and treatment for diabetic patients, especially those who require insulin therapy.