Salvia miltiorrhiza is a medicinal plant widely used in the treatment of cardiovascular and cerebrovascular diseases. Hydrophilic phenolic acids, including rosmarinic acid (RA) and lithospermic acid B (LAB), are its primary medicinal ingredients. However, the biosynthetic pathway of RA and LAB in S. miltiorrhiza is still poorly understood. In the present study, we accomplished the isolation and characterization of a novel S. miltiorrhiza Hydroxyphenylpyruvate reductase (HPPR) gene, SmHPPR, which plays an important role in the biosynthesis of RA. SmHPPR contained a putative catalytic domain and a NAD(P)H-binding motif. The recombinant SmHPPR enzyme exhibited high HPPR activity, converting 4-hydroxyphenylpyruvic acid (pHPP) to 4-hydroxyphenyllactic acid (pHPL), and exhibited the highest affinity for substrate 4-hydroxyphenylpyruvate. SmHPPR expression could be induced by various treatments, including SA, GA3, MeJA and Ag +, and the changes in SmHPPR activity were correlated well with hydrophilic phenolic acid accumulation. SmHPPR was localized in cytoplasm, most likely close to the cytosolic NADPH-dependent hydroxypyruvate reductase active in photorespiration. In addition, the transgenic S. miltiorrhiza hairy roots overexpressing SmHPPR exhibited up to 10-fold increases in the products of hydrophilic phenolic acid pathway. In conclusion, our findings provide a new insight into the synthesis of active pharmaceutical compounds at molecular level.