ABSTRACT: Importance:Adverse drug events (ADEs) account for up to 16% of emergency department (ED) visits and 7% of hospital admissions. Medication reconciliation is required for hospital accreditation because it can reduce medication discrepancies, but there is no evidence that reducing discrepancies reduces ADEs or other adverse outcomes. Objective:To evaluate whether electronic medication reconciliation reduces ADEs, medication discrepancies, and other adverse outcomes compared with usual care. Design, Setting, and Participants:This cluster randomized trial involved 3491 patients who were discharged from 2 medical units and 2 surgical units at the McGill University Health Centre, Montreal, Quebec, Canada, between October 2014 and November 2016. Data analysis took place from July 2017 to July 2019. Intervention:The RightRx intervention electronically retrieved community drugs from the provincial insurer and aligned them with in-hospital drugs to facilitate reconciliation and communication at care transitions. Main Outcomes and Measures:The primary outcome was ADEs in 30 days after discharge. Secondary outcomes included medication discrepancies, ED visits, hospital readmissions, and a composite outcome of ED visits, readmissions, and death up to 90 days after discharge. Results:Of 4656 eligible patients, 3567 (76.6%) consented to participate (2060 [57.8%] men; mean [SD] age, 69.8 [14.9] years). Overall, 76 patients died during the hospital stay, so 3491 patients were included in the analysis. There was no significant difference in the risk of ADEs between intervention and control groups (76 [4.6%] vs 73 [4.0%]; OR, 0.97; 95% CI, 0.33-1.48), ED visits (433 [26.2%] vs 488 [26.6%]; OR, 0.83; 95% CI, 0.36-1.42), hospital readmission (170 [10.3%] vs 261 [14.2%]; OR, 0.22; 95% CI, 0.06-1.14), or the composite outcome (447 [27.0%] vs 506 [27.6%]; OR, 0.75; 95% CI, 0.34-1.27) at 30 days. Medication discrepancies were significantly reduced in the intervention group compared with the control group (437 [26.4%] vs 1029 [56.0%]; OR, 0.24; 95% CI, 0.12-0.57). Changes made to community medications (OR, 1.05; 95% CI, 1.01-1.10) and new medications (OR, 1.09; 95% CI, 1.01-1.18) were significant risk factors for ADEs. Conclusions and Relevance:Electronic medication reconciliation reduced medication discrepancies but did not reduce ADEs or other adverse outcomes. Hospital accreditation should focus on interventions that reduce the risk of adverse events for patients with multiple changes to community medications. Trial Registration:ClinicalTrials.gov identifier: NCT01179867.