DNA methylation (DNAm)-based biological age (epigenetic age) has been suggested as a useful biomarker of age-related conditions including type 2 diabetes (T2D), and its newest iterations (GrimAge measurements) have shown early promise. In this study, we explored the association between epigenetic age and incident T2D in the context of their relationships with obesity. A total of 1,057 participants in the Coronary Artery Risk Development in Young Adults (CARDIA) study were included in the current analyses. We stratified the participants into three groups: normal weight, overweight, and obese. A 1-year increase of GrimAge was associated with higher 10-year (study years 15-25) incidence of T2D (odds ratio [OR] 1.06, 95% CI 1.01-1.11). GrimAge acceleration, which represents the deviation of GrimAge from chronological age, was derived from the residuals of a model of GrimAge and chronological age, and any GrimAge acceleration (positive GrimAA: having GrimAge older than chronological age) was associated with significantly higher odds of 10-year incidence of T2D in obese participants (OR 2.57, 95% CI 1.61-4.11). Cumulative obesity was estimated by years since obesity onset, and GrimAge partially mediated the statistical association between cumulative obesity and incident diabetes or prediabetes (proportion mediated = 8.0%). In conclusion, both older and accelerated GrimAge were associated with higher risk of T2D, particularly among obese participants. GrimAge also statistically mediated the associations between cumulative obesity and T2D. Our findings suggest that epigenetic age measurements with DNAm can potentially be used as a risk factor or biomarker associated with T2D development.