Genetic background, plasma metabolome and dietary data from 4,215 women and 1,490 men reveal 57 metabolites whose associations with dementia risk vary by APOE4 genotype and other risk variants. Here, APOE is linked to dementia.