DNA methylation maintenance by DNMT1 is an essential process in mammals but molecular mechanisms connecting DNA methylation patterns and enzyme activity remain elusive. Here, we systematically analyzed the specificity of DNMT1, revealing a pronounced influence of the DNA sequences flanking the target CpG site on DNMT1 activity. We determined DNMT1 structures in complex with preferred DNA substrates revealing that DNMT1 employs flanking sequence-dependent base flipping mechanisms, with large structural rearrangements of the DNA correlating with low catalytic activity. Moreover, flanking sequences influence the conformational dynamics of the active site and cofactor binding pocket. Importantly, we show that the flanking sequence preferences of DNMT1 highly correlate with genomic methylation in human and mouse cells, and 5-azacytidine triggered DNA demethylation is more pronounced at CpG sites with flanks disfavored by DNMT1. Overall, our findings uncover the intricate interplay between CpG-flanking sequence, DNMT1-mediated base flipping and the dynamic landscape of DNA methylation.