Sperm competition is an important selective force in many organisms. As a result, sperm have evolved to be among the most diverse cells in the animal kingdom. However, the relationship between sperm morphology, sperm motility and fertilization success is only partially understood. The extent to which between-male variation is heritable is largely unknown, and remarkably few studies have investigated the genetic architecture of sperm traits, especially sperm morphology. Here we use high-density genotyping and gene expression profiling to explore the considerable sperm trait variation that exists in the zebra finch Taeniopygia guttata. We show that nearly all of the genetic variation in sperm morphology is caused by an inversion polymorphism on the Z chromosome acting as a 'supergene'. These results provide a striking example of two evolutionary genetic predictions. First, that in species where females are the heterogametic sex, genetic variation affecting sexually dimorphic traits will accumulate on the Z chromosome. Second, recombination suppression at the inversion allows beneficial dominant alleles to become fixed on whichever haplotype they first arise, without being exchanged onto other haplotypes. Finally, we show that the inversion polymorphism will be stably maintained by heterozygote advantage, because heterozygous males have the fastest and most successful sperm.