EA significantly downregulated P2Y12 expression, weakened the activation of microglia, and then inhibited IL-1β expression in the mPFC, thus relieving visceral pain and depression in IBD mice. Here, P2RY12 is linked to inflammatory bowel disease.