Objective: There is some evidence implicating diet in the development of inflammatory diseases. We aimed to study the influence of dietary habits on the risk of developing multiple sclerosis (MS). Methods: We used a population-based case–control study recruiting incident cases of MS (1953 cases, 3557 controls). Subjects with different dietary habits 5 years prior to MS diagnosis were compared regarding MS risk by calculating odds ratios (OR) with 95% confidence intervals (CI) using logistic regression models. Adjustment was made for a large number of environmental and lifestyle habits, including ancestry, smoking, alcohol consumption, body mass index, physical activity, and sun exposure habits. Results: Mediterranean diet was associated with lower risk of developing MS (adjusted OR = 0.54, 95% CI: 0.34–0.86, p = 0.009), compared with Western-style diet. There was no significant association between vegetarian/vegan diet and MS risk (adjusted OR = 0.96, 95% CI: 0.75–1.24, p = 0.976), nor between diet with low glycemic index and MS risk (adjusted OR = 0.93, 95% CI: 0.60–1.42, p = 0.518). Conclusions: Mediterranean diet may exert a protective influence regarding the risk of subsequently developing MS compared with Western-style diet.