Populations of Drosophila melanogaster face significant mortality risks from parasitoid wasps that use species-specific strategies to locate and survive in hosts. We tested the hypothesis that parasitoids with different strategies select for alternative host defense characteristics and in doing so contribute to the maintenance of fitness variation and produce trade-offs among traits. We characterized defense traits of Drosophila when exposed to parasitoids with different host searching behaviors (Aphaereta sp. and Leptopilina boulardi). We used host larvae with different natural alleles of the gene Dopa decarboxylase (Ddc), a gene controlling the production of dopamine and known to influence the immune response against parasitoids. Previous population genetic analyses indicate that our focal alleles are maintained by balancing selection. Genotypes exhibited a trade-off between the immune response against Aphaereta sp. and the ability to avoid parasitism by L. boulardi. We also identified a trade-off between the ability to avoid parasitism by L. boulardi and larval competitive ability as indicated by differences in foraging and feeding behavior. Genotypes differed in dopamine levels potentially explaining variation in these traits. Our results highlight the potential role of parasitoid biodiversity on host fitness variation and implicate Ddc as an antagonistic pleiotropic locus influencing larval fitness traits. © 2012 The Author(s). Evolution © 2012 The Society for the Study of Evolution.