Chronic inflammation is an important factor in colorectal carcinogenesis. However, evidence on the effect of pro-inflammatory and anti-inflammatory foods and nutrients is scarce. Moreover, there are few studies focusing on diet-gene interactions on inflammation and colorectal cancer (CRC). This study was designed to investigate the association between the novel dietary inflammatory index (DII) and CRC and its potential interaction with polymorphisms in inflammatory genes. Data from the Bellvitge Colorectal Cancer Study, a case-control study (424 cases with incident colorectal cancer and 401 hospital-based controls), were used. The DII score for each participant was obtained by multiplying intakes of dietary components from a validated dietary history questionnaire by literature-based dietary inflammatory weights that reflected the inflammatory potential of components. Data from four important single nucleotide polymorphisms located in genes thought to be important in inflammation-associated CRC: i.e., interleukin (IL)-4, IL-6, IL-8, and peroxisome proliferator-activated receptor-γ (PPARG) were analyzed. A direct association was observed between DII score and CRC risk (ORQ4 vs. Q1 1.65, 95 % CI 1.05-2.60, and P trend 0.011). A stronger association was found with colon cancer risk (ORQ4 vs. Q1 2.24, 95 % CI 1.33-3.77, and P trend 0.002) than rectal cancer risk (ORQ4 vs. Q1 1.12, 95 % CI 0.61-2.06, and P trend 0.37). DII score was inversely correlated with SNP rs2243250 in IL-4 among controls, and an interaction was observed with CRC risk. Neither correlation nor interaction was detected for other inflammatory genes. Overall, high-DII diets are associated with increased risk of CRC, particularly for colon cancer, suggesting that dietary-mediated inflammation plays an important role in colorectal carcinogenesis.