Author Summary Genes related to the sexual regulator Doublesex of Drosophila have been found to control sexual development in a wide variety of animals, ranging from roundworms to mammals. In this paper, we investigate the function of the Dmrt7 gene, one of seven related genes in the mouse. Female mammals are XX and males are XY, a chromosomal difference that presents specific challenges during the meiotic phase of male germ cell development. Some of these are thought to be overcome by incorporating the X and Y chromosomes into a specialized structure called the XY body. We find that DMRT7 protein is present in germ cells, localizes to the male XY body during meiosis, and is essential for male but not female fertility. The XY body normally is altered by recruitment of additional proteins and by specific modifications to histone proteins between the pachytene and diplotene stages of meiosis, but modification of the “sex chromatin” in Dmrt7 mutant cells is abnormal during this period. Because Dmrt7 is found in all branches of mammals, but not in other vertebrates, these results may indicate some commonality in regulation of sex chromatin among the mammals.