The use of electronic health records allows for the application of a novel medication risk score for the rapid identification of ambulatory patients at risk of adverse drug events. We sought to examine the longitudinal association of medication risk score with mortality. This retrospective cohort study included patients whose data were available through electronic health records from multiple health care organizations in the United States that provided data as part of a Patient Safety Organization. Patients were included if they had ≥1 visit and ≥1 medication in their record between January 1, 2011, to June 30, 2017. Cox proportional hazards regression was used to examine the association between continuous and categorized medication risk score with all-cause mortality. Among 427,103 patients, the median age was 50 years (interquartile range, 29–64 years); 61% were female; 50% were White, 11% were Black, and 38% were Hispanic; and 6873 had a death date recorded. Patients 30 to 49 years old had the highest hazard ratios (HRs), followed by the 50- to 64-year-olds and lastly those 65 years or older. Controlling for all covariates, 30- to 49-year-olds with a score of 20 to 30 (versus <10) had a 604% increase in the hazard of death (HR, 7.04; 95% confidence interval [CI], 3.86–12.85), 50- to 64-year-olds had a 254% increase (HR, 3.54; 95% CI, 2.71–4.63), and ≥65-year-olds had an 87% increase (HR, 1.87; 95% CI, 1.67–2.09). The medication risk score was independently associated with death, adjusting for multimorbidities and other conditions. Risk was found to vary by age group and score. Results suggest that pharmaceutical interventions among those with elevated scores could improve medication safety for patients taking multiple medications.