Although the inverse association between coffee consumption and risk of diabetes has been reported numerous times, the role of caffeine intake in this association has remained unclear. We evaluated the consumption of coffee and other beverages and food containing caffeine in relation to the incidence of diabetes. The study participants were 5897 men and 7643 women in a community-based cohort in Takayama, Japan. Consumption of coffee, green tea, oolong tea, black tea and chocolate snacks were measured with a semi-quantitative FFQ in 1992. At the follow-up survey in 2002, the development of diabetes and the time of diagnosis were reported. To assess the association, age, smoking status, BMI, physical activity, education in years, alcohol consumption, total energy intake, fat intake and women's menopausal status were adjusted. Among men who consumed one cup per month to six cups per week and among those who consumed one cup per d or more, the associated hazard ratios were 0.69 (95 % CI 0.50, 0.97) and 0.69 (95 % CI 0.49, 0.98) compared with those who drank little to no coffee, with a P value for trend of 0.32. The hazard ratios for women with the same coffee consumption patterns were 1.08 (95 % CI 0.74, 1.60) and 0.70 (95 % CI 0.44, 1.12), with a P value for trend of 0.03. The association between estimated total caffeine intake and risk of diabetes was insignificant both among men and among women. The results imply that coffee consumption decreased the risk of developing diabetes. The protective effect may exist aside from the influence of caffeine intake.