DNA methylation is an epigenetic mechanism that is essential for regulating gene transcription. However, aberrant DNA methylation, which is a nearly universal finding in cancer, can result in disturbed gene expression. DNA methylation is modified by environmental factors such as diet that may modify cancer risk and tumor behavior. Abnormal DNA methylation has been observed in several cancers such as colon, stomach, cervical, prostate, and breast cancers. These alterations in DNA methylation may play a critical role in cancer development and progression. Dietary nutrient intake and bioactive food components are essential environmental factors that may influence DNA methylation either by directly inhibiting enzymes that catalyze DNA methylation or by changing the availability of substrates required for those enzymatic reactions such as the availability and utilization of methyl groups. In this review, we focused on nutrients that act as methyl donors or methylation co-factors and presented intriguing evidence for the role of these bioactive food components in altering DNA methylation patterns in cancer. Such a role is likely to have a mechanistic impact on the process of carcinogenesis and offer possible therapeutic potentials.