H3K9 tri-methylation (H3K9me3) plays emerging roles in gene regulation, beyond its accumulation on pericentric constitutive heterochromatin. It remains a mystery why and how H3K9me3 undergoes dynamic regulation in male meiosis. Here, we identify a novel, critical regulator of H3K9 methylation and spermatogenic heterochromatin organization: the germline-specific protein ATF7IP2 (MCAF2). We show that, in male meiosis, ATF7IP2 amasses on autosomal and X pericentric heterochromatin, spreads through the entirety of the sex chromosomes, and accumulates on thousands of autosomal promoters and retrotransposon loci. On the sex chromosomes, which undergo meiotic sex chromosome inactivation (MSCI), the DNA damage response pathway recruits ATF7IP2 to X pericentric heterochromatin, where it facilitates the recruitment of SETDB1, a histone methyltransferase that catalyzes H3K9me3. In the absence of ATF7IP2, male germ cells are arrested in meiotic prophase I. Analyses of ATF7IP2-deficient meiosis reveal its essential roles in the maintenance of MSCI, suppression of retrotransposons, and global upregulation of autosomal genes. We propose that ATF7IP2 is a downstream effector of the DDR pathway in meiosis that coordinates the organization of heterochromatin and gene regulation through the spatial regulation of SETDB1-mediated H3K9me3 deposition.