Our findings highlight the novel role of ERβ in gut-brain communications, which might be one of the reasons for sex differences in IBD and the related psychiatric comorbidities. Here, ESR2 is linked to irritable bowel syndrome.