Enzymatic methylation of DNA plays important roles in both prokaryotes and eukaryotes. Structural study of the HhaI DNA methyltransferase has provided considerable insight into the chemistry of C5-cytosine methylation. The DNA-protein complex reveals a substrate cytosine flipped out of the double helix during the reaction, and a novel two-loop DNA-binding motif used for both sequence recognition and flipping the base. Structural comparison of HhaI C5-cytosine methyltransferase, TaqI N6-adenine methyltransferase, and catechol O-methyltransferase reveals a common catalytic domain structure, which might be universal among S-adenosyl-L-methionine (SAM)-dependent methyltransferases.