To evaluate the effect of the combination of linagliptin and insulin on metabolic control and prognosis in hospitalized patients with severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) infection and hyperglycemia. A parallel double-blind randomized clinical trial including hospitalized patients with SARS-CoV-2 infection and hyperglycemia, randomized to receive 5 mg linagliptin + insulin (LI group) or insulin alone (I group) was performed. The main outcomes were the need for assisted mechanical ventilation and glucose levels during hospitalization. Subjects were screened for eligibility at hospital admission if they were not with assisted mechanical ventilation and presented hyperglycemia, and a total of 73 patients with SARS-CoV-2 infection and hyperglycemia were randomized to the LI group (n = 35) or I group (n = 38). The average hospital stay was 12 ± 1 vs 10 ± 1 days for the I and LI groups, respectively (p = 0.343). There were no baseline clinical differences between the study groups, but the percentage of males was higher in the LI group (26 vs 18, p = 0.030). The improvements in fasting and postprandial glucose levels were better in the LI group that the I group (122 ± 7 vs 149 ± 10, p = 0.033; and 137 ± 7 vs 173 ± 12, p = 0.017, respectively), and insulin requirements tended to be lower in the LI group than the I group. Three patients in the LI group and 12 in the I group required assisted mechanical ventilation (HR 0.258, CI 95% 0.092–0.719, p = 0.009); 2 patients in the LI group and 6 in the I group died after a follow-up of 30 days (p = 0.139). No major side effects were observed. The combination of linagliptin and insulin in hospitalized patients with SARS-CoV-2 infection and hyperglycemia reduced the relative risk of assisted mechanical ventilation by 74% and improved better pre and postprandial glucose levels with lower insulin requirements, and no higher risk of hypoglycemia.This study is registered at clinicaltrials.gov, number NCT04542213 on 09/03/2020.