BackgroundPatient‐initiated or “before medically advised” (BMA) hospital discharge is more common among people who use drugs. Transitions of care can be destabilizing and might increase the risk of subsequent illicit drug overdose.ObjectivesThis study sought to evaluate whether BMA discharge is associated with an increased risk of subsequent drug overdose (primary objective) and whether physician‐advised discharge is associated with an increased risk of subsequent drug overdose (secondary objective).MethodsWe performed a case‐crossover analysis of population‐based linked administrative health data for individuals experiencing an overdose between 2016 and 2019 in British Columbia, Canada. Using conditional logistic regression, we compared the likelihood of hospital discharge in the 28 days before overdose (the “pre‐overdose interval”) to the likelihood of hospital discharge in two self‐matched 28‐day control intervals ending 26 and 52 weeks before overdose.ResultsOver the 3.5‐year study interval, 235 of 27,584 (0.9%) pre‐overdose intervals and 189 of 55,168 (0.3%) control intervals included a BMA discharge, suggesting that BMA discharge was associated with a twofold increase in the risk of subsequent drug overdose (adjusted odds ratio [aOR], 2.08; 95% confidence interval [95% CI], 1.68–2.58; p < 0.001). Physician‐advised hospital discharge was also a risk factor for subsequent overdose, occurring in 1350 of 27,584 (4.9%) pre‐overdose intervals and 1625 of 55,168 (2.9%) control intervals (aOR, 1.39; 95% CI, 1.27–1.52; p < .001).ConclusionsBoth BMA and physician‐advised hospital discharge are independently associated with transient increases in the risk of subsequent illicit drug overdose. Better in‐hospital treatment of substance use disorder and novel means of post‐discharge outreach should be deployed to reduce this risk.