The dietary inflammatory index (DII) is a novel way of describing diet that has been studied in relation to various health conditions, including cardiovascular disease (CVD) in several populations. We aimed to investigate the association between DII and CVD events among a representative population sample in northeastern Iran. This prospective cohort study was a subsample of 4,672 adults aged 35–65 years, and recruited as part of Mashhad stroke and heart atherosclerotic disorder cohort study population. The DII was computed at baseline according to a 65‐item validated food frequency questionnaire. Cox regression was used to determine the association of DII with incident CVD. One hundred twenty‐four participants developed CVD (including 24 cases of myocardial infarction [MI], 34 cases of stable angina [SA], and 66 cases of unstable angina [UA]). After adjusting for potential confounding factors, a hazard ratios of 1.06 (95% confidence interval: 0.70–1.60), 1.36 (95% confidence interval: 0.52–3.52), 1.33 (95% confidence interval: 0.60–2.94), and 0.86 (95% confidence interval: 0.48–1.53) were found for total CVD, MI, SA, and UA events, respectively, among the participants with proinflammatory diet (DII ≥ 0) versus those with anti‐inflammatory diet (DII < 0). There was no statistically significant association between the DII and total CVD, MI, SA, or UA in this population of middle‐aged Iranian men and women.