Beneficial interactions between endophytes and plants are critical for plant growth and metabolite accumulation. Nevertheless, the secondary metabolites controlling the feedback between the host plant and the endophytic microbial community remain elusive in medicinal plants. In this report, we demonstrate that plant-derived triterpenoids predominantly promote the growth of endophytic bacteria and fungi, which in turn promote host plant growth and secondary metabolite productions. From culturable bacterial and fungal microbial strains isolated from the medicinal plant Schisandra sphenanthera, through triterpenoid-mediated screens, we constructed six synthetic communities (SynComs). By using a binary interaction method in plates, we revealed that triterpenoid-promoted bacterial and fungal strains (TPB and TPF) played more positive roles in the microbial community. The functional screening of representative strains suggested that TPB and TPF provide more beneficial abilities to the host. Moreover, pot experiments in a sterilized system further demonstrated that TPB and TPF play important roles in host growth and metabolite accumulation. In summary, these experiments revealed a role of triterpenoids in endophytic microbiome assembly and indicated a strategy for constructing SynComs on the basis of the screening of secondary metabolites, in which bacteria and fungi join forces to promote plant health. These findings may open new avenues towards the breeding of high yielding and high metabolite-accumulating medicinal plants by exploiting their interaction with beneficial endophytes.