The associations between one-carbon metabolism (OCM) nutrients (methionine, folate, vitamin B6, and vitamin B12) and Alzheimer's disease (AD) remains inconclusive. This study aims to investigate the association of dietary OCM nutrients with the subsequent risk of AD, and further assessed whether participants with a high genetic risk for AD might benefit from dietary OCM nutrients. We analyzed data from 192,214 participants who completed at least one 24-hour dietary questionnaire and had no previous history of AD based on the UK Biobank. Nutrients intake was calculated using McCance and Widdowson's The Composition of Food and USDA's Food and Nutrient Database for Dietary Studies. Cox proportional models with restricted cubic splines were applied to explore the associations. Over a median follow-up of 13.35 years, 959 cases of AD (41 early-onset cases and 918 late-onset cases) were identified. Compared to those in the low-intake OCM group (quartile 1), participants in the high-intake OCM group (quartile 4) had a reduced risk of developing AD. The corresponding hazard ratios (HRs) and 95% CI for methionine, folate, vitamin B6, and vitamin B12 intake were 0.66 (0.54, 0.80), 0.71 (0.58, 0.87), 0.71 (0.59, 0.87), and 0.77 (0.64, 0.93), respectively. Similar associations were observed in late-onset AD. In early-onset AD, high methionine and vitamin B12 intake were associated with a 70% (HR = 0.30, 95% CI: 0.10, 0.86) and 71% (HR = 0.29, 95% CI: 0.09, 0.96) reduction in risk, respectively. Participants with low genetic risk and high OCM nutrients intake had a >75% reduced AD risk compared to high-risk, low-intake participants. In this prospective cohort study, we found that higher intake of OCM nutrients is associated with a reduced risk of AD. Participants with a high genetic risk of AD are more likely to benefit from dietary OCM nutrients intake.