Hamilton and Zuk proposed that females choose mates based on ornaments whose expression is dependent on their genetically based resistance to parasites. The major histocompatibility complex (MHC) plays an important role in pathogen recognition and is a good candidate for testing the relationships between immune genes and both ornament expression and parasite resistance. We tested the hypothesis that female common yellowthroats prefer to mate with more ornamented males, because it is a signal of their MHC-based resistance to parasites and likelihood of survival. In this species, females prefer males that have larger black facial masks as extrapair mates. Using pyrosequencing, we found that mask size was positively related to the number of different MHC class II alleles, as predicted if greater variation at the MHC allows for the recognition of a greater variety of pathogens. Furthermore, males with more MHC class II alleles had greater apparent survival, and resistance to malaria infection was associated with the presence of a particular MHC class II allele. Thus, extrapair mating may provide female warblers with immunity genes that are related to parasite resistance, survival, and the expression of a male ornament, consistent with good genes models of sexual selection.