Diet has direct and indirect effects on health through inflammation and the gut microbiome. We investigated total dietary inflammatory potential via the literature-derived index (Dietary Inflammatory Index (DII®)) with gut microbiota diversity, composition and function. In cancer-free patient volunteers initially approached at colonoscopy and healthy volunteers recruited from the medical centre community, we assessed 16S ribosomal DNA in all subjects who provided dietary assessments and stool samples (n 101) and the gut metagenome in a subset of patients with residual fasting blood samples (n 34). Associations of energy-adjusted DII scores with microbial diversity and composition were examined using linear regression, permutational multivariate ANOVA and linear discriminant analysis. Spearman correlation was used to evaluate associations of species and pathways with DII and circulating inflammatory markers. Across DII levels, α- and β-diversity did not significantly differ; however, Ruminococcus torques, Eubacterium nodatum, Acidaminococcus intestini and Clostridium leptum were more abundant in the most pro-inflammatory diet group, while Akkermansia muciniphila was enriched in the most anti-inflammatory diet group. With adjustment for age and BMI, R. torques, E. nodatum and A. intestini remained significantly associated with a more pro-inflammatory diet. In the metagenomic and fasting blood subset, A. intestini was correlated with circulating plasminogen activator inhibitor-1, a pro-inflammatory marker (rho = 0·40), but no associations remained significant upon correction for multiple testing. An index reflecting overall inflammatory potential of the diet was associated with specific microbes, but not overall diversity of the gut microbiome in our study. Findings from this preliminary study warrant further research in larger samples and prospective cohorts.