Understanding the genetic mechanisms that control transposon activity is key to unraveling sources of genetic variation. In this study, we looked for genetic determinants of CG methylation, an epigenetic mark suppressing transposon expression. Our genome-wide association study in Arabidopsis identified the CELL DIVISION CYCLE ASSOCIATED 7 (CDCA7) gene as a crucial regulator of CG methylation at transposons. We show that CDCA7 binds to DECREASED DNA METHYLATION 1 (DDM1), known to repress transposon activity. Interestingly, in vertebrates, the DDM1 ortholog LSH/HELLS interacts with CDCA7, although the interdependence of their functions is not fully understood. Our analysis of cdca7 and ddm1 null mutants in plants reveals that DDM1 activity is largely dependent on CDCA7. Genetic variation in the CDCA7 promoter region appears to fine-tune this pathway in natural populations. We discovered two divergent CDCA7 alleles, arising from an ancestral haplotype, that confer opposite phenotypic outcomes and have become prevalent in distinct environmental settings. In sum, our work shows that CDCA7 acts as a controller of global DNA methylation levels in natural populations, with the potential to modulate numerous epigenetically controlled traits, including transposon activity.