Salvia miltiorrhiza is one of the most commonly used Chinese medicinal herbs. Tanshinone I and tanshinone IIB with anti-inflammatory, anti-bacterial, anti-oxidative, anti-neoplastic, neuron protective, and heart protective properties are valuable active components in it. However, the biosynthetic pathway of tanshinone IIB and tanshinone I has not been completely elucidated. Here, we identified a tanshinone IIA 19-hydroxylase from S. miltiorrhiza. In vitro and in vivo analyses showed that SmCYP71D373 could hydroxylate tanshinone IIA at C-19 position to produce tanshinone IIB. Reaction conditions optimization demonstrated that the catalytic efficiency of SmCYP71D373 was the highest using the substrate-feeding method under the following conditions, fed the tanshinone IIA into the Saccharomyces cerevisiae expressing codon-optimized SmCYP71D373 at 28℃ for 24 hours. And the yield of tanshinone IIB was up to 6.38%. Furthermore, N121 and S210 of SmCYP71D373 were verified as the key amino acid residues responsible for its catalytic activity for tanshinone IIA by molecular docking and site-directed mutagenesis. The results not only lay a foundation for the elucidation of tanshinone I synthesis pathway, but also provide the theoretical support to improve the catalytic efficiency of SmCYP71D373 for tanshinone IIB production.