Terpenoids are widely distributed in plants and are often used as defense molecules in plant-microbe interactions. However, endophytic microorganisms usually establish a better symbiotic relationship with their hosts by secreting enzymes to avoid defense plant metabolites. This study evaluated the in vitro biotransformation activity of licorice endophytic fungi on glycyrrhizin and further explored the molecular regulation of their in vivo colonization on the licorice growth and metabolism. The results indicated that licorice endophytic fungi generally possessed the ability to bio-transform glycyrrhizin, with Z6 and Z15 exhibiting glycyrrhizin-induced β-glucuronidase activity. The Z6GH2 and Z15GH2 proteins were identified to hydrolyze glycyrrhizin in different ways by prokaryotic and eukaryotic experiments. In vivo re-infestation of licorice by Z6 and Z15 revealed significant promotion of glycyrrhizin biosynthesis and accumulation by regulating the expression levels of genes involved in glycolysis and glycyrrhizin biosynthesis pathway in licorice. These findings were further validated in J3, which has glycyrrhizin biotransformation properties. In summary, this study reveals the molecular mechanism by which endophytic fungi with glycyrrhizin β-glucuronidase activity promote glycyrrhizin biosynthesis and accumulation in licorice through feedback regulation of its metabolic flux. These finding highlight the importance of endophytic fungi in regulating the accumulation of active ingredients in medicinal plants.