DNA methylation, various DNA repair mechanisms, and possibly early events in the opening of DNA as required for transcription and replication are initiated by flipping of a DNA base out of the DNA double helix. The energetics and structural mechanism of base flipping in the presence of the DNA-processing enzyme, cytosine 5-methyltransferase from HhaI (M.HhaI), were obtained through molecular dynamics based upon free-energy calculations. Free-energy profiles for base flipping show that, when in the closed conformation, M.HhaI lowers the free-energy barrier to flipping by 17 kcalmol and stabilizes the fully flipped state. Flipping is shown to occur via the major groove of the DNA. Structural analysis indicates that flipping is facilitated by destabilization of the DNA double-helical structure and substitution of DNA base-pairing and base-stacking interactions with DNA-protein interactions. The fully flipped state is stabilized by DNA-protein interactions that are enhanced upon binding of coenzyme. This study represents an atomic detail description of the mechanism by which a protein facilitates specific structural distortion in DNA.