A higher magnesium intake may reduce the risk of depression. We analyzed this association in the SUN Mediterranean cohort with an expanded sample size (n = 15,836) and a long follow-up (median = 10.2 y). We followed 9,289 women (age = 34.8, SD = 10.4) and 6,547 men (age = 42.8, SD = 13.1) initially free of any history of depression for a new-onset of medically diagnosed depression (maximum follow-up = 15.9 y). All participants in this cohort were university educated. We systematically reviewed previous studies relating magnesium to depression. We observed 837 incident cases of depression during 147,915 person-years of follow-up in the SUN cohort. No significant association of magnesium intake with the risk of depression was found, with a fully-adjusted hazard ratio = 0.85 (95% confidence interval = 0.60-1.22, for fifth versus first quintile). When we used a more restrictive definition for depression (both a medical diagnosis and habitual use of antidepressants), this HR was 0.63 (0.35-1.14). No significant association was found in our systematic review. No conclusive evidence for an association between magnesium dietary intake and depression incidence was found. Further longitudinal studies with a larger sample size and a better assessment of confounders and of depression cases are needed to try to identify potential protection against depression by magnesium.