Abstract Background: Taxilli Herba (TH) is a semi-parasitic therapeutic herb and the host plant is a key factor affecting its quality. Morus alba L. (SS) and Liquidambar formosana Hance (FXS) are the two most frequent hosts. The purpose of this study was to elucidate the underlying molecular mechanism causing the variation in the accumulation of bioactive constituents in TH from SS and FXS. Results: In this paper, 3319 differentially expressed genes (DEGs) comprising the transcription factor families AP2/ERF and MYB super_family were identified. In addition, 81 compounds were identified and their relative levels were compared between the SS and FXS groups using data from the ultra-fast liquid chromatography coupled with triple quadrupole-time of flight tandem mass spectrometry (UFLC-Triple TOF-MS/MS) analysis. Putative biosynthesis networks of flavonoid and phenylpropanoid were created combined with structural genes. The expression patterns of genes were mostly consistent with the variation of bioactive constituents in TH. Notably, the expression trend of UDP-glycosyltransferase genes in TH suggested that postmodification of glycosyltransferase may participate in downstream flavonoid synthesis. Conclusions: The findings of this work would shed light on the relationship between gene regulation and the flavonoid and phenylpropanoid biosynthesis in TH, providing fundamental information on the difference in molecular mechanisms for the quality formation of TH from various hosts.