Gametogenesis is a sexually dimorphic process requiring profound differences in germ cell differentiation between the sexes. In mammals, the presence of heteromorphic sex chromosomes in males creates additional sex-specific challenges, including incomplete X and Y pairing during meiotic prophase. This triggers formation of a heterochromatin domain, the XY body. The XY body disassembles after prophase, but specialized sex chromatin persists, with further modification, through meiosis. Here, we investigate the function of DMRT7, a mammal-specific protein related to the invertebrate sexual regulators Doublesex and MAB-3. We find that DMRT7 preferentially localizes to the XY body in the pachytene stage of meiotic prophase and is required for male meiosis. In Dmrt7 mutants, meiotic pairing and recombination appear normal, and a transcriptionally silenced XY body with appropriate chromatin marks is formed, but most germ cells undergo apoptosis during pachynema. A minority of mutant cells can progress to diplonema, but many of these escaping cells have abnormal sex chromatin lacking histone H3K9 di- and trimethylation and heterochromatin protein 1beta accumulation, modifications that normally occur between pachynema and diplonema. Based on the localization of DMRT7 to the XY body and the sex chromatin defects observed in Dmrt7 mutants, we conclude that DMRT7 plays a role in the sex chromatin transformation that occurs between pachynema and diplonema. We suggest that DMRT7 may help control the transition from meiotic sex chromosome inactivation to postmeiotic sex chromatin in males. In addition, because it is found in all branches of mammals, but not in other vertebrates, Dmrt7 may shed light on evolution of meiosis and of sex chromatin.