DNA methylation is prevalent in mammalian genomes and plays a central role in the epigenetic control of development. The mammalian DNA methylation machinery is thought to be composed of three DNA methyltransferase enzymes (DNMT1, DNMT3A, and DNMT3B) and one cofactor (DNMT3L). Here, we describe the discovery of Dnmt3C, a de novo DNA methyltransferase gene that evolved via a duplication of Dnmt3B in rodent genomes and was previously annotated as a pseudogene. We show that DNMT3C is the enzyme responsible for methylating the promoters of evolutionarily young retrotransposons in the male germ line and that this specialized activity is required for mouse fertility. DNMT3C reveals the plasticity of the mammalian DNA methylation system and expands the scope of the mechanisms involved in the epigenetic control of retrotransposons.