BACKGROUND: Interpretation of the evidence from randomised controlled trials (RCTs) of remdesivir in patients treated in hospital for COVID-19 is conflicting. We aimed to assess the benefits and harms of remdesivir compared with placebo or usual care in these patients, and whether treatment effects differed between prespecified patient subgroups. METHODS: For this systematic review and meta-analysis, we searched PubMed, Embase, the Cochrane COVID-19 trial registry, ClinicalTrials.gov, the International Clinical Trials Registry Platform, and preprint servers from Jan 1, 2020, until April 11, 2022, for RCTs of remdesivir in adult patients hospitalised with COVID-19, and contacted the authors of eligible trials to request individual patient data. The primary outcome was all-cause mortality at day 28 after randomisation. We used multivariable hierarchical regression-adjusting for respiratory support, age, and enrollment period-to investigate effect modifiers. This study was registered with PROSPERO, CRD42021257134. FINDINGS: Our search identified 857 records, yielding nine RCTs eligible for inclusion. Of these nine eligible RCTs, individual data were provided for eight, covering 10 480 patients hospitalised with COVID-19 (99% of such patients included in such RCTs worldwide) recruited between Feb 6, 2020, and April 1, 2021. Within 28 days of randomisation, 662 (12·5%) of 5317 patients assigned to remdesivir and 706 (14·1%) of 5005 patients assigned to no remdesivir died (adjusted odds ratio [aOR] 0·88, 95% CI 0·78-1·00, p=0·045). We found evidence for a credible subgroup effect according to respiratory support at baseline (pinteraction=0·019). Of patients who were ventilated-including those who received high-flow oxygen-253 (30·0%) of 844 patients assigned to remdesivir died compared with 241 (28·5%) of 846 patients assigned to no remdesivir (aOR 1·10 [0·88-1·38]; low-certainty evidence). Of patients who received no oxygen or low-flow oxygen, 409 (9·1%) of 4473 patients assigned to remdesivir died compared with 465 (11·2%) of 4159 patients assigned to no remdesivir (0·80 [0·70-0·93]; high-certainty evidence). No credible subgroup effect was found for time to start of remdesivir after symptom onset, age, presence of comorbidities, enrolment period, or corticosteroid use. Remdesivir did not increase the frequency of severe or serious adverse events. INTERPRETATION: This individual patient data meta-analysis showed that remdesivir reduced mortality in patients hospitalised with COVID-19 who required no or conventional oxygen support, but was underpowered to evaluate patients who were ventilated when receiving remdesivir. The effect size of remdesivir in patients with more respiratory support or acquired immunity and the cost-effectiveness of remdesivir remain to be further elucidated. FUNDING: EU-RESPONSE.