P2Y12 shRNA and EA significantly downregulated the expression of P2Y12, weakened the activation of microglia, and then inhibited IL-1β expression in the mPFC, thus relieving visceral pain and depression-like behaviors in IBD mice. This evidence concerns the gene P2RY12 and irritable bowel syndrome.