BACKGROUND: Prior evidence suggests that diet modifies the association of blood ceramides with the risk of incident cardiovascular disease (CVD). It remains unknown if diet quality modifies the association of very long-chain-to-long-chain ceramide ratios with mortality in the community. OBJECTIVES: Our objectives were to determine how healthy dietary patterns associate with blood ceramide concentrations and to examine if healthy dietary patterns modify associations of ceramide ratios (C22:0/C16:0 and C24:0/C16:0) with all-cause and cause-specific mortality. METHODS: We examined 2157 participants of the Framingham Offspring Study (mean age = 66 y, 55% women). Blood ceramides were quantified using a validated assay. We evaluated prospective associations of the Dietary Guidelines Adherence Index (DGAI) and Mediterranean-style Diet Score (MDS) with incidence of all-cause and cause-specific mortality using Cox proportional hazards models. Cross-sectional associations of the DGAI and MDS with ceramides were evaluated using multivariable linear regression models. RESULTS: The C22:0/C16:0 and C24:0/C16:0 ceramide ratios were inversely associated with all-cause, CVD, and cancer mortality; multivariable-adjusted HRs (95% CIs) were 0.73 (0.67, 0.80) and 0.70 (0.63, 0.77) for all-cause mortality, 0.74 (0.60, 0.90) and 0.69 (0.55, 0.86) for CVD mortality, and 0.75 (0.65, 0.87) and 0.75 (0.64, 0.88) for cancer mortality, respectively. Inverse associations of the C22:0/C16:0 and C24:0/C16:0 ceramide ratios with cancer mortality were attenuated among individuals with a higher diet quality (DGAI or MDS above the median, all P-interaction ≤0.1). The DGAI and MDS had distinct associations with ceramide ratios (DGAI: lower C22:0/C16:0 across quartiles; MDS: higher C24:0/C16:0 across quartiles; all P-trend ≤0.01). CONCLUSION: In our community-based sample, ceramide ratios (C22:0/C16:0 and C24:0/C16:0) were associated with a lower risk of all-cause and cause-specific mortality. Further, we observed that a higher overall diet quality attenuates the association between blood ceramide ratios and cancer mortality and that dietary patterns have distinct relations with ceramide ratios.