© The Author 2015. Published by Oxford University Press. All rights reserved. Type 2 diabetes mellitus (DM) is an established risk factor for a wide range of vascular diseases, including ischemic stroke (IS). Glycated hemoglobin A1c (HbA1c), a marker for average blood glucose levels over the previous 12 weeks, is used as a measure of glycemic control and also as a diagnostic criterion for diabetes (HbA1c levels ≥ 6.5%). Epigenetic mechanisms, such as DNA methylation, may be associated with aging processes and with modulation of the risk of various pathologies, such as DM. Specifically, DNA methylation could be one of the mechanisms mediating the relation between DM and environmental exposures. Our goal was to identify new CpG methylation sites associated with DM. We performed a genome-wide methylation study in whole-blood DNA from an IS patient cohorts. Illumina HumanMethylation450 BeadChip array was used to measure DNA methylation in CpG sites. All statistical analyses were adjusted for sex, age, hyperlipidemia, body mass index (BMI), smoking habit and cell count. Findings were replicated in two independent cohorts, an IS cohort and a population-based cohort, using the same array. In the discovery phase (N = 355), we identified a CpG site, cg19693031 (located in the TXNIP gene) that was associated with DM (P = 1.17 × 10-12); this CpG was replicated in two independent cohorts (N = 167 and N = 645). Methylation of TXNIP was inversely and intensely associated with HbA1c levels (P = 7.3 × 10-16), specifically related to diabetic patients with poor control of glucose levels. We identified an association between the TXNIP gene and DM through epigenetic mechanisms, related to sustained hyperglycemia levels (HbA1c ≥ 7%).