Experimental models shows that bioenergetic homeostasis changes with increasing age based on apolipoprotein E (APOE) gene. However, such link with dementia remains unclear in population. We used H1-NMR metabolome in blood from 118,021 random-selected participants in UK Biobank (n=118,021 individuals), and identified 56 metabolites associated with the risk of dementia. In the participants without developing dementia during follow-up, 82% (46/56) metabolites are also associated with reaction time, and dementia shares metabolite signatures with total brain volume. We found that incident Alzheimer,s disease (AD) is associated with energy metabolism-related metabolites, i.e, β-hydroxybutyrate, acetone, and valine, whose concentrations in blood are influenced by age and APOE genotype. Valine shows a declined trajectories after a plateau at age around 60 years which is in parallel with BMI. Moreover, we found associations of AD with valine and β-hydroxybutyrate in brain tissue are different as their associations in the periphery, which implies the key role of transports in regulating the energy metabolism of AD. Our study provides strong evidence that the onset of AD in APOE4 carriers is regulated by the impaired energy balance in the brain.