The aim of this study was to investigate the association between dietary magnesium and the risk of overall cancer using a meta-analysis. We searched PubMed, SCOPUS, and the Cochrane Review through November 2012. All the articles searched were independently reviewed by 3 authors based on predetermined selection criterion. A total of 13 epidemiologic studies, 6 case-control studies, and 7 prospective cohort studies involving 1,236,004 participants were included in the final analysis. When all studies were pooled, the relative risk (RR) of overall cancer for the highest level of dietary magnesium intake was 0.801 [95% confidence interval (CI): 0.664-0.966) compared with the lowest level of dietary magnesium intake. In subgroup meta-analyses by study design, there was a significant inverse association between dietary magnesium and the risk of cancer in case-control studies (RR = 0.663, 95% CI: 0.475-0.925), whereas there was no significant association in prospective cohort studies (RR = 0.888, 95% CI: 0.745-1.060). Furthermore, there was a significant preventive effect of dietary magnesium for colorectal cancer (RR = 0.775, 95% CI: 0.655-0.919), but not for other cancer. Our meta-analysis showed that higher dietary magnesium intake seems to have a protective effect for cancer, especially colorectal cancer and in females.