Background: Chronic, low-grade inflammation is an established risk factor for cardiovascular disease. The inflammatory impact of diet can be reflected by concentrations of inflammatory markers in the bloodstream and the inflammatory potential of diet can be estimated by the dietary inflammatory index (DII (TM)), which has been associated with cardiovascular disease risk in some previous studies. We aimed to examine the association between the DII and the risk of first myocardial infarction (MI) in a population-based study with long follow-up. Method: We conducted a prospective case-control study of 1389 verified cases of first MI and 5555 matched controls nested within the population-based cohorts of the Northern Sweden Health and Disease Study (NSHDS), of which the largest is the ongoing Vasterbotten Intervention Programme (VIP) with nearly 100 000 participants during the study period. Median follow-up from recruitment to MI diagnosis was 6.4 years (6.2 for men and 7.2 for women). DII scores were derived from a validated food frequency questionnaire (FFQ) administered in 1986-2006. Multivariable conditional logistic regression models were used to estimate odds ratios (OR) and 95% confidence intervals (CI), using quartile 1 (most anti-inflammatory diet) as the reference category. For validation, general linear models were used to estimate the association between the DII scores and two inflammatory markers, high-sensitivity C-reactive protein (hsCRP) and interleukin 6 (IL-6) in a subset (n = 605) of the study population. Results: Male participants with the most pro-inflammatory DII scores had an increased risk of MI [ORQ4vsQ1 = 1.57 (95% CI 1.21-2.02) P-trend = 0.02], which was essentially unchanged after adjustment for potential confounders, including cardiovascular risk factors [ORQ4vsQ1 = 1.50 (95% CI 1.14-1.99), P-trend = 0.10]. No association was found between DII and MI in women. An increase of one DII score unit was associated with 9% higher hsCRP (95% CI 0. 03-0.14) and 6% higher IL-6 (95% CI 0.02-0.11) in 605 controls with biomarker data available. Conclusion: A pro-inflammatory diet was associated with an elevated risk of first myocardial infarction in men; whereas for women the relationship was null. Consideration of the inflammatory impact of diet could improve prevention of cardiovascular disease.