Dysregulation of methyl donor nutrients interferes with DNA methylation and is associated with neurological diseases. ABCG1 gene regulates cholesterol to HDL-C, maintains lipid homeostasis, and has been linked to both methyl nutrition and neurological risks. The aim was to investigate whether there is an effect of ABCG1 DNA methylation on the relationship between intake of methyl donor nutrients and the risk of stroke occurrence. We hypothesize that the intake of methyl donor nutrients may influence stroke occurrence by modulating the methylation status of ABCG1. This study utilized a case-control design and selected 52 stroke patients along with 52 healthy controls from Northwest China. Dietary information was collected using a FFQ, and methylation levels were measured at 29 CpG sites of the ABCG1 gene. A significant linear trend was found between dietary intake of the methyl donor nutrient choline and CpG_19.20 methylation of the ABCG1 gene (β = -0.037, P = 0.033). Additionally, a significant association was observed between CpG_19.20 methylation and the risk of stroke (OR 2.325, 95% CI 1.210 - 4.466). Mediation analysis revealed that choline intake indirectly influenced stroke occurrence through its effect on CpG_19.20 methylation levels in the ABCG1 gene (β = -0.015, SE = 0.013, 95% CI = [-0.053, -0.001]). We found that DNA methylation at specific CpG sites of the peripheral blood ABCG1 gene mediates the association between dietary methyl donor nutrient intake and stroke risk in an adult population from Northwest China. New insights are provided on the prevention and treatment of stroke.