© 2020, The Author(s). Studies of inflammatory bowel disease (IBD) have been inconclusive in relating microbiota with distribution of inflammation. We report microbiota, host transcriptomics, epigenomics and genetics from matched inflamed and non-inflamed colonic mucosa [50 Crohn’s disease (CD); 80 ulcerative colitis (UC); 31 controls]. Changes in community-wide and within-patient microbiota are linked with inflammation, but we find no evidence for a distinct microbial diagnostic signature, probably due to heterogeneous host-microbe interactions, and show only marginal microbiota associations with habitual diet. Epithelial DNA methylation improves disease classification and is associated with both inflammation and microbiota composition. Microbiota sub-groups are driven by dominant Enterbacteriaceae and Bacteroides species, representative strains of which are pro-inflammatory in vitro, are also associated with immune-related epigenetic markers. In conclusion, inflamed and non-inflamed colonic segments in both CD and UC differ in microbiota composition and epigenetic profiles.