Complex biotic interactions shape ecological communities of plants, herbivores and their natural enemies. In studies of multi-trophic interactions, the presence of small, invisible micro-organisms associated with plants and those of a fourth above-ground trophic level have often been neglected. Incorporating these neglected factors improves our understanding of the processes within a multi-trophic network. Here, we ask whether the presence of a fungal endosymbiont, which alters plant quality by producing herbivore-toxic substances, trickles up the food chain and affects the performance and host-selection behaviour of aphid secondary parasitoids. We simultaneously offered hosts from endophyte-free and endophyte-infected environments to secondary parasitoids. Older and more experienced parasitoid females discriminated against hosts from the endophyte-infected environment. Developing in lower quality hosts from the endophyte-infected environment reduced the lifespan of secondary parasitoids. This indicates that aphid secondary parasitoids can perceive the disadvantage for their developing offspring in parasitoids from the endophyte environment and can learn to discriminate against them. In the field, this discrimination ability may shift the success of primary parasitoids to endophyte-infected plants, which co-occur with endophyte-free plants. Ultimately, the control of aphids depends on complex interactions between primary and secondary parasitoids and their relative sensitivity to endophytic fungi.