Females choose specific mates in order to produce fitter offspring. However, several factors interfere with females' control over fertilization of their eggs, including sneaker males and phenotypically unpredictable allele segregation during meiosis. Mate choice at the individual level thus provides only a poor approximation for obtaining the best genetic match. Consequently, postcopulatory sperm selection by female oocytes has been proposed as a mechanism to achieve complementary combinations of parental haplotypes. Here, using controlled in vitro fertilization of three‐spined stickleback eggs, we find haplotype‐specific fertilization bias toward gametes with complementary major histocompatibility complex (MHC) immunogenes. The resulting zygote (and thus offspring) genotypes exhibit an intermediate level of individual MHC diversity that was previously shown to confer highest pathogen resistance. Our finding of haplotype‐specific gamete selection thus represents an intriguing mechanism for fine‐tuned optimization of the offspring's immune gene composition and an evolutionary advantage in the Red Queen dynamics of host‐parasite coevolution.