The enzyme 11β-hydroxysteroid dehydrogenase (11β-HSD) interconverts active glucocorticoids and their intrinsically inert 11-keto forms. The type 1 isozyme, 11β-HSD1, predominantly reactivates glucocorticoids in vivo and can also metabolise bile acids. 11β-HSD1-deficient mice show altered inflammatory responses and are protected against the adverse metabolic effects of a high-fat diet. However, the impact of 11β-HSD1 on the composition of the gut microbiome has not previously been investigated. We used high-throughput 16S rDNA amplicon sequencing to characterise the gut microbiome of 11β-HSD1-deficient and C57Bl/6 control mice, fed either a standard chow diet or a cholesterol- and fat-enriched ‘Western’ diet. 11β-HSD1 deficiency significantly altered the composition of the gut microbiome, and did so in a diet-specific manner. On a Western diet, 11β-HSD1 deficiency increased the relative abundance of the family Bacteroidaceae, and on a chow diet, it altered relative abundance of the family Prevotellaceae. Our results demonstrate that (i) genetic effects on host–microbiome interactions can depend upon diet and (ii) that alterations in the composition of the gut microbiome may contribute to the aspects of the metabolic and/or inflammatory phenotype observed with 11β-HSD1 deficiency.