We study how the opioid epidemic shaped local population dynamics in the United States. Exploiting variation in exposure that stems from Purdue Pharma‘s targeted marketing of OxyContin to high-cancer-mortality areas, we find that more exposed commuting zones experienced lower population growth. By 2020, a one-standard-deviation increase in exposure reduced population growth among individuals aged 18 to 64 by 2.4 percentage points. Direct mortality from drug-induced deaths made only a limited contribution to these changes. Instead, population losses were primarily driven by migratory responses: exposure increased out-migration rates, especially among college-educated individuals. These responses are consistent with the opioid epidemic operating as a disamenity shock, deteriorating local quality of life. Working in the opposite direction, we also document a rise in fertility rates that, by 2020, partially counteracts these population losses. Our findings show that the opioid epidemic reshaped local demographic composition and contributed to the long-run divergence in population dynamics across U.S. commuting zones.