Opioids are the primary drugs used in Western medicine for pain management and palliative care. Farming of opium poppies remains the sole source of these essential medicines, despite diverse market demands and uncertainty in crop yields due to weather, climate change, and pests. We engineered yeast to produce the selected opioid compounds thebaine and hydrocodone starting from sugar. All work was conducted in a laboratory that is permitted and secured for work with controlled substances. We combined enzyme discovery, enzyme engineering, and pathway and strain optimization to realize full opiate biosynthesis in yeast. The resulting opioid biosynthesis strains required the expression of 21 (thebaine) and 23 (hydrocodone) enzyme activities from plants, mammals, bacteria, and yeast itself. This is a proof of principle, and major hurdles remain before optimization and scale-up could be achieved. Open discussions of options for governing this technology are also needed in order to responsibly realize alternative supplies for these medically relevant compounds.