Berberine is a plant-derived benzylisoquinoline alkaloid with diverse pharmaceutical activities, however, the production of berberine from medicinal plants and organic synthesis remains unsustainable. Here, the authors report the complete biosynthesis of berberine in yeast by engineering genes from plants and bacteria.