Spermatogenesis is a key developmental process allowing for a formation of a mature male gamete. During its final phase, spermiogenesis, haploid round spermatids undergo cellular differentiation into spermatozoa, which involves extensive restructuring of cell morphology, DNA, and epigenome. Using mouse models with abrogated Y chromosome gene complements and Y-derived transgene we identified Y chromosome encoded Zfy2 as the gene responsible for sperm formation and function. In the presence of a Zfy2 transgene, mice lacking the Y chromosome and transgenic for two other Y-derived genes, Sry driving sex determination and Eif2s3y initiating spermatogenesis, are capable of producing sperm which when injected into the oocytes yield live offspring. Therefore, only three Y chromosome genes, Sry, Eif2s3y and Zfy2, constitute the minimum Y chromosome complement compatible with successful intracytoplasmic sperm injection in the mouse.