Tilianin and linarin, two rare glycosylated flavonoids in the aromatic endangered medicinal plant Nardostachys jatamansi (D.on)DC., play an important role in the fields of medicine, cosmetics, food and dye industries. However, there remains a lack of comprehensive understanding regarding their biosynthetic pathway. In this study, the phytochemical investigation of N. jatamansi resulted in the isolation of linarin. With help of AlphaFold2 to cluster the entire glycosyltransferase family based on predicted structure similarities, we successfully identified a flavonoid glycosyltransferase NjUGT73B1, which could efficiently catalyze the glucosylation of acacetin at 7-OH to produce tilianin, also the key precursor in the biosynthesis of linarin. Additionally, NjUGT73B1 displayed a high degree of substrate promiscuity, enabling glucosylation at 7-OH of many flavonoids. Molecular modeling and site-directed mutagenesis revealed that H19, H21, H370, F126, and F127 play the crucial roles in the glycosylation ability of NjUGT73B1. Notably, comparation with the wild NjUGT73B1, mutant H19K led to a 50% increase in the activity of producing tilianin from acacetin.