Methylates CpG residues. Preferentially methylates hemimethylated DNA. Associates with DNA replication sites in S phase maintaining the methylation pattern in the newly synthesized strand; that is essential for epigenetic inheritance. Associates with chromatin during G2 and M phases to maintain DNA methylation independently of replication. It is responsible for maintaining methylation patterns established in development. DNA methylation is coordinated with methylation of histones. Mediates transcriptional repression by direct binding to HDAC2. In association with DNMT3B and via the recruitment of CTCFL/BORIS; involved in activation of BAG1 gene expression by modulating dimethylation of promoter histone H3 at H3K4 and H3K9. {ECO:0000269|PubMed:16357870; ECO:0000269|PubMed:18413740; ECO:0000269|PubMed:18754681}.