DNA methylation functions in gene silencing and the maintenance of genome integrity. In plants, non-CG DNA methylation is linked through a self-reinforcing loop with histone 3 lysine 9 dimethylation (H3K9me2). The plant-specific SUPPRESSOR OF VARIEGATION 3-9 HOMOLOG (SUVH) family H3K9 methyltransferases (MTases) bind to DNA methylation marks and catalyze H3K9 methylation. Here, we analyzed the structure and function of Arabidopsis thaliana SUVH6 to understand how this class of enzyme maintains methylation patterns in the genome. We reveal that SUVH6 has a distinct 5-methyl-dC (5mC) base-flipping mechanism involving a thumb loop element. Autoinhibition of H3 substrate entry is regulated by a SET domain loop, and a conformational transition in the post-SET domain upon cofactor binding may control catalysis. In vitro DNA binding and in vivo ChIP-seq data reveal that the different SUVH family H3K9 MTases have distinct DNA binding preferences, targeting H3K9 methylation to sites with different methylated DNA sequences, explaining the context biased non-CG DNA methylation in plants.