DNA methylation-based epigenetic age measures have been used as biological aging markers and are associated with a healthy lifespan. Few population-based studies have examined the relation between diet and epigenetic age acceleration. We aimed to investigate the relation between diet quality and epigenetic age acceleration. We analyzed data from 1995 participants (mean age, 67 years; 55% women) of the Framingham Heart Study Offspring Cohort. Cross-sectional associations between the Dietary Approaches to Stop Hypertension (DASH) score and 3 whole-blood DNA methylation-derived epigenetic age acceleration measures-Dunedin Pace of Aging Methylation (DunedinPoAm), GrimAge acceleration (GrimAA), and PhenoAge acceleration (PhenoAA)-were examined. A mediation analysis was conducted to assess the mediating role of epigenetic age acceleration in relation to DASH and all-cause mortality. A higher DASH score was associated with lower levels of DunedinPoAm (β = -0.05; SE=0.02; P=0.007), GrimAA (β = -0.09; SE=0.02; P<0.001), and PhenoAA (β = -0.07; SE=0.02; P=0.001). All 3 epigenetic measures mediated the association between the DASH score and all-cause mortality, with mean proportions of 22.1% for DunedinPoAm (Pmediation=0.04), 45.1% for GrimAA (Pmediation=0.001), and 22.9% for PhenoAA (Pmediation=0.03). An interaction was observed between the DASH score and smoking status in relation to the epigenetic aging markers. The association between the DASH score and epigenetic aging markers tended to be stronger in "ever-smokers" (former and current smokers) compared to "never-smokers." The proportions of mediation were 31.3% for DunedinPoAm, 46.8% for GrimAA, and 10.3% for PhenoAA in ever-smokers, whereas no significant mediation was observed in never-smokers. Higher diet quality is associated with slower epigenetic age acceleration, which partially explains the beneficial effect of diet quality on the lifespan. Our findings emphasize that adopting a healthy diet is crucial for maintaining healthy aging.