Walnuts are composed of a complex array of biologically active constituents with individual cancer-protective properties. Here, we assessed the potential benefit of whole walnut consumption in a mouse tumor bioassay using azoxymethane. In study 1, a modest reduction (1.3-fold) in tumor numbers was observed in mice fed a standard diet (AIN-76A) containing 9.4% walnuts (15% of total fat). In study 2, the effects of walnut supplementation was tested in the Total Western Diet (TWD). There was a significant reduction (2.3-fold; P < 0.02) in tumor numbers in male mice fed TWD containing 7% walnuts (10.5% of total fat). Higher concentrations of walnuts lacked inhibitory effects, particularly in female mice, indicating there may be optimal levels of dietary walnut intake for cancer prevention. Since components of the Mediterranean diet have been shown to affect the gut microbiome, the effects of walnuts were therefore tested in fecal samples using 16S rRNA gene sequencing. Carcinogen treatment reduced the diversity and richness of the gut microbiome, especially in male mice, which exhibited lower variability and greater sensitivity to environmental changes. Analysis of individual operational taxonomic units (OTU) identified specific groups of bacteria associated with carcinogen exposure, walnut consumption, and/or both variables. Correlation analysis also identified specific OTU clades that were strongly associated with the presence and number of tumors. Taken together, our results indicate that walnuts afford partial protection to the colon against a potent carcinogenic insult, and this may be due, in part, to walnut-induced changes to the gut microbiome. Cancer Prev Res; 9(8); 692–703. ©2016 AACR.