BACKGROUND Hydroxychloroquine and chloroquine have been proposed as treatments for coronavirus disease 2019 (Covid-19) on the basis of in vitro activity and data from uncontrolled studies and small, randomized trials. METHODS In this randomized, controlled, open-label platform trial comparing a range of possible treatments with usual care in patients hospitalized with Covid-19, we randomly assigned 1561 patients to receive hydroxychloroquine and 3155 to receive usual care. The primary outcome was 28-day mortality. RESULTS The enrollment of patients in the hydroxychloroquine group was closed on June 5, 2020, after an interim analysis determined that there was a lack of efficacy. Death within 28 days occurred in 421 patients (27.0%) in the hydroxychloroquine group and in 790 (25.0%) in the usual-care group (rate ratio, 1.09; 95% confidence interval [CI], 0.97 to 1.23; P = 0.15). Consistent results were seen in all prespecified subgroups of patients. The results suggest that patients in the hydroxychloroquine group were less likely to be discharged from the hospital alive within 28 days than those in the usual-care group (59.6% vs. 62.9%; rate ratio, 0.90; 95% CI, 0.83 to 0.98). Among the patients who were not undergoing mechanical ventilation at baseline, those in the hydroxychloroquine group had a higher frequency of invasive mechanical ventilation or death (30.7% vs. 26.9%; risk ratio, 1.14; 95% CI, 1.03 to 1.27). There was a small numerical excess of cardiac deaths (0.4 percentage points) but no difference in the incidence of new major cardiac arrhythmia among the patients who received hydroxychloroquine. CONCLUSIONS Among patients hospitalized with Covid-19, those who received hydroxychloroquine did not have a lower incidence of death at 28 days than those who received usual care.