Inflammation alters host physiology to promote cancer, as seen in colitis-associated colorectal cancer (CRC). Here, we identify the intestinal microbiota as a target of inflammation that affects the progression of CRC. High-throughput sequencing revealed that inflammation modifies gut microbial composition in colitis-susceptible interleukin-10-deficient (Il10-/-) mice. Monocolonization with the commensal Escherichia coli NC101 promoted invasive carcinoma in azoxymethane (AOM)-treated Il10-/- mice. Deletion of the polyketide synthase (pks) genotoxic island from E. coli NC101 decreased tumor multiplicity and invasion in AOM/Il10-/- mice, without altering intestinal inflammation. Mucosa-associated pks+ E. coli were found in a significantly high percentage of inflammatory bowel disease and CRC patients. This suggests that in mice, colitis can promote tumorigenesis by altering microbial composition and inducing the expansion of microorganisms with genotoxic capabilities.