Coffee may protect against multiple chronic diseases, particularly type 2 diabetes, but the mechanisms remain unclear.Leveraging dietary and metabolomic data in two large cohorts of women (the Nurses' Health Study [NHS] and NHSII), we identified and validated plasma metabolites associated with coffee intake in 1,595 women. We then evaluated the prospective association of coffee-related metabolites with diabetes risk and the added predictivity of these metabolites for diabetes in two nested case-control studies (n = 457 case and 1,371 control subjects).Of 461 metabolites, 34 were identified and validated to be associated with total coffee intake, including 13 positive associations (primarily trigonelline, polyphenol metabolites, and caffeine metabolites) and 21 inverse associations (primarily triacylglycerols [TAGs] and diacylglycerols [DAGs]). These associations were generally consistent for caffeinated and decaffeinated coffee, except for caffeine and its metabolites that were only associated with caffeinated coffee intake. The three cholesteryl esters positively associated with coffee intake showed inverse associations with diabetes risk, whereas the 12 metabolites negatively associated with coffee (5 DAGs and 7 TAGs) showed positive associations with diabetes. Adding the 15 diabetes-associated metabolites to a classical risk factor-based prediction model increased the C-statistic from 0.79 (95% CI 0.76, 0.83) to 0.83 (95% CI 0.80, 0.86) (P < 0.001). Similar improvement was observed in the validation set.Coffee consumption is associated with widespread metabolic changes, among which lipid metabolites may be critical for the antidiabetes benefit of coffee. Coffee-related metabolites might help improve prediction of diabetes, but further validation studies are needed.