Data from National Health and Nutrition Examination Survey (2007–2016) was used to examine the cross-sectional association between different types of coffee and caffeine intake and glucose metabolism markers. Linear regression and restricted cubic spline were adopted with adjustments for potential covariates. There was inverse association of insulin resistance with total coffee, caffeinated coffee, caffeine from coffee, and total caffeine intake (all β < 0, all P < 0.05). And this association was more apparent in women. Restricted cubic spline analyses showed a nonlinearly inverse relationship among the above association. Moreover, total coffee, caffeinated coffee, caffeine from coffee, and total caffeine intake were conversely associated with fasting blood glucose among women (all β < 0, all P < 0.05). Besides, the instant coffee intake of women was positively correlated with glycosylated hemoglobin (β = 0.026, P＜0.05).