In summary, we found that gut dysbiosis induced by ERβ deficiency is crucial for the development of IBD and anxiety-like behavior by regulating the HPA axis hyperactivity. Here, ESR2 is linked to irritable bowel syndrome.