Plant microbiomes that comprise diverse microorganisms, including prokaryotes, eukaryotes and viruses, are the key determinants of plant population dynamics and ecosystem function. Despite their importance, little is known about how species interactions (especially trophic interactions) between microbes from different domains modify the importance of microbiomes for plant hosts and ecosystems. Using the common duckweed Lemna minor, we experimentally examined the effects of predation (by bacterivorous protists) and parasitism (by bacteriophages) within microbiomes on plant population size and ecosystem phosphorus removal. Our results revealed that the addition of predators increased plant population size and phosphorus removal, whereas the addition of parasites showed the opposite pattern. The structural equation modelling further pointed out that predation and parasitism affected plant population size and ecosystem function via distinct mechanisms that were both mediated by microbiomes. Our results highlight the importance of understanding microbial trophic interactions for predicting the outcomes and ecosystem impacts of plant-microbiome symbiosis.