Glycosylation is an important post-modification reaction in plant secondary metabolism, and contributes to structural diversity of bioactive natural products. In plants, glycosylation is usually catalyzed by UDP-glycosyltransferases. Flavonoid 2′-O-glycosides are rare glycosides. However, no UGTs have been reported, thus far, to specifically catalyze 2′-O-glycosylation of flavonoids. In this work, UGT71AP2 was identified from the medicinal plant Scutellaria baicalensis as the first flavonoid 2′-O-glycosyltransferase. It could preferentially transfer a glycosyl moiety to 2′-hydroxy of at least nine flavonoids to yield six new compounds. Some of the 2′-O-glycosides showed noticeable inhibitory activities against cyclooxygenase 2. The crystal structure of UGT71AP2 (2.15 Å) was solved, and mechanisms of its regio-selectivity was interpreted by pKa calculations, molecular docking, MD simulation, MM/GBSA binding free energy, QM/MM, and hydrogen‒deuterium exchange mass spectrometry analysis. Through structure-guided rational design, we obtained the L138T/V179D/M180T mutant with remarkably enhanced regio-selectivity (the ratio of 7-O-glycosylation byproducts decreased from 48% to 4%) and catalytic efficiency of 2′-O-glycosylation (kcat/Km, 0.23 L/(s·μmol), 12-fold higher than the native). Moreover, UGT71AP2 also possesses moderate UDP-dependent de-glycosylation activity, and is a dual function glycosyltransferase. This work provides an efficient biocatalyst and sets a good example for protein engineering to optimize enzyme catalytic features through rational design.