Metformin was proposed to be a candidate for host-directed therapy for COVID-19. However, its efficacy remains to be validated. In this study, we compared the outcome of metformin users and nonusers in hospitalized COVID-19 patients with diabetes. Hospitalized diabetic patients with confirmed COVID-19 in the Tongji Hospital of Wuhan, China, from January 27, 2020 to March 24, 2020, were grouped into metformin and no-metformin groups according to the diabetic medications used. The demographics, characteristics, laboratory parameters, treatments, and clinical outcome in these patients were retrospectively assessed. A total of 283 patients (104 in the metformin and 179 in the no-metformin group) were included in this study. There were no significant differences between the two groups in gender, age, underlying diseases, clinical severity, and oxygen-support category at admission. The fasting blood glucose level of the metformin group was higher than that of the no-metformin group at admission and was under effective control in both groups after admission. Other laboratory parameters at admission and treatments after admission were not different between the two groups. The length of hospital stay did not differ between the two groups (21.0 days for metformin versus 19.5 days for no metformin, P = 0.74). However, in-hospital mortality was significantly lower in the metformin group (3/104 (2.9%) versus 22/179 (12.3%), P = 0.01). Antidiabetic treatment with metformin was associated with decreased mortality compared with diabetics not receiving metformin. This retrospective analysis suggests that metformin may offer benefits in patients with COVID-19 and that further study is indicated.