Colorectal cancer (CRC) is the third most common form of cancer and poses a critical public health threat due to the global spread of westernized diets high in meat, cholesterol, and fat. Although the link between diet and colorectal cancer has been well established, the mediating role of the gut microbiota remains elusive. In this study, we sought to elucidate the connection between the gut microbiota, diet, and CRC through metagenomic analysis of bacteria isolated from the stool of CRC (n = 89) and healthy (n = 161) subjects. This analysis yielded a dozen genera that were significantly altered in CRC patients, including increased Bacteroides, Fusobacterium, Dorea, and Porphyromonas prevalence and diminished Pseudomonas, Prevotella, Acinetobacter, and Catenibacterium carriage. Based on these altered genera, we developed two novel CRC diagnostic models through stepwise selection and a simplified model using two increased and two decreased genera. As both models yielded strong AUC values above 0.8, the simplified model was applied to assess diet-based CRC risk in mice. Mice fed a westernized high-fat diet (HFD) showed greater CRC risk than mice fed a regular chow diet. Furthermore, we found that nonglutinous rice, glutinous rice, and sorghum consumption reduced CRC risk in HFD-fed mice. Collectively, these findings support the critical mediating role of the gut microbiota in diet-induced CRC risk as well as the potential of dietary grain intake to reduce microbiota-associated CRC risk. Further study is required to validate the diagnostic prediction models developed in this study as well as the preventive potential of grain consumption to reduce CRC risk.