Abstract Background The goal of our study is to investigate whether the methylation levels of AHCY and CBS promoters are related to the risk of cerebral infarction by detecting the methylation level of AHCY and CBS genes. Methods We extracted peripheral venous blood from 152 patients with cerebral infarction and 152 gender- and age-matched healthy controls, and determined methylation levels of AHCY and CBS promoters using quantitative methylation-specific polymerase chain reaction. We used the percentage of methylation reference (PMR) to indicate gene methylation level. Results We compared the promoter methylation levels of two genes (AHCY and CBS) in peripheral blood DNA between the cerebral infarction case group and the control group. Our study showed no significant difference in AHCY promoter methylation between case and control. Subgroup analysis by gender showed that the methylation level of AHCY in males in the case group was lower than that in the control group, but the difference was not statistically significant in females. In a subgroup analysis by age, there was no significant difference in the AHCY methylation level between the case and control in the young group (≤44 years old). However, the level of AHCY gene methylation in the middle-aged group (45–59 years old) was significantly higher and the aged group (≥60 years old) was significantly lower than that in the control groups. However, CBS promoter methylation levels were significantly lower in the case group than in the control group (median PMR: 70.20% vs 104.10%, P = 3.71E-10). In addition, the CBS methylation levels of males and females in the case group were significantly lower than those in the control group (male: 64.33% vs 105%, P = 2.667E-08; female: 78.05% vs 102.8%, P = 0.003). We also found that the CBS levels in the young (23–44), middle-aged (45–59), and older (60–90) groups were significantly lower than those in the control group (young group: 69.97% vs 114.71%; P = 0.015; middle-aged group: 56.04% vs 91.71%; P = 6.744E-06; older group: 81.6% vs 119.35%; P = 2.644E-04). Our ROC curve analysis of CBS hypomethylation showed an area under the curve of 0.713, a sensitivity of 67.4%, and a specificity of 74.0%. Conclusion Our study suggests that hypomethylation of the CBS promoter may be closely related to the risk of cerebral infarction and may be used as a non-invasive diagnostic biomarker for cerebral infarction.