Previous studies on consumption of caffeine and risk of multiple sclerosis (MS) have yielded inconclusive results. We aimed to investigate whether consumption of coffee is associated with risk of MS. Using two population-representative case-control studies (a Swedish study comprising 1620 cases and 2788 controls, and a US study comprising 1159 cases and 1172 controls), participants with different habits of coffee consumption based on retrospective data collection were compared regarding risk of MS, by calculating ORs with 95% CIs. Logistic regression models were adjusted for a broad range of potential confounding factors. Compared with those who reported no coffee consumption, the risk of MS was substantially reduced among those who reported a high consumption of coffee exceeding 900 mL daily (OR 0.70 (95% CI 0.49 to 0.99) in the Swedish study, and OR 0.69 (95% CI 0.50 to 0.96) in the US study). Lower odds of MS with increasing consumption of coffee were observed, regardless of whether coffee consumption at disease onset or 5 or 10 years prior to disease onset was considered. In accordance with studies in animal models of MS, high consumption of coffee may decrease the risk of developing MS. Caffeine, one component of coffee, has neuroprotective properties, and has been shown to suppress the production of proinflammatory cytokines, which may be mechanisms underlying the observed association. However, further investigations are needed to determine whether exposure to caffeine underlies the observed association and, if so, to evaluate its mechanisms of action.