Within a large, community-based cohort, we found low levels of mid-life serum magnesium to be associated with an elevated risk of incident dementia, with a 24% increased risk of dementia for participants in the bottom compared to the top magnesium quintile, even when adjusting for demographics, lifestyle, cardiovascular risk factors, APOE4 carrier status, and other micronutrients. Here, APOE is linked to dementia.