Colorectal cancer (CRC) is a significant public health concern globally, with inflammation and estrogen signaling pathways playing pivotal roles in its pathogenesis. This study delves into how inflammation, estrogen receptor beta (ERβ), and gut microbiota vary between sexes in CRC using a mice model. It aims to investigate the interactions between gut microbiome composition and gene expression, and their influence on cancer development associated with colitis. Whole genome microbiome data was analyzed employing the PhyloSeq package and ANCOM BC2 for relative abundance and differential abundance analysis, respectively. The results showed increased abundance of family Muribaculaceae across all experimental groups. Differential abundance analysis revealed higher microbiome abundance in female mice, especially in ERβ knockout females. DESeq2 analysis was utilized to assess gene expression changes (RNA-seq), with subsequent pathway analysis revealing functional insights. ERβ knockout mice, especially males, exhibited a significant increase in gene expression after treatment, suggesting a potential role in inflammatory responses. Multi-correlation analysis was conducted to explore associations between microbiota and gene expression using the Spearman's rank correlation method. Wildtype mice (male and female) and ERβ knockout male mice exhibited negative correlations between the genes associated with immune and inflammatory pathways and species of Eubacterium E hallii A, Agathobacter sp002474415, and Duncaniella sp001689575, respectively. ERβ knockout female mice displayed significant positive correlations between genes linked to immune and inflammatory responses and certain species belonging to the family Enterobacteriaceae. In conclusion, this study highlights potential interactions between host genes and gut microbiota, suggesting that these interactions may significantly influence the development and progression of colorectal cancer. This study contributes to the understanding that differences in genotype and sex impact gut microbiota composition, which in turn affects inflammation and contributes to CRC pathogenesis.