Central sensitization is essential in maintaining chronic pain induced by chronic pancreatitis (CP), but cortical modulation of painful CP remains elusive. Here, we examined the role of the anterior cingulate cortex (ACC) in the pathogenesis of abdominal hyperalgesia in a rat model of CP induced by intraductal administration of trinitrobenzene sulfonic acid (TNBS). TNBS treatment resulted in long-term abdominal hyperalgesia and anxiety in rats. Morphological data indicated that painful CP induced a significant increase in FOS-expressing neurons in the nucleus tractus solitarii (NTS) and ACC, and some FOS-expressing neurons in the NTS projected to the ACC. In addition, a larger portion of ascending fibers from the NTS innervated pyramidal neurons, the neural subpopulation primarily expressing FOS under the condition of painful CP, rather than GABAergic neurons within the ACC. CP rats showed increased expression of vesicular glutamate transporter 1, and increased membrane trafficking and phosphorylation of the N-methyl-D-aspartate receptor (NMDAR) subunit NR2B and the α-amino-3-hydroxy-5-methyl-4-isoxazole propionic acid receptor (AMPAR) subunit GluR1 within the ACC. Microinjection of NMDAR and AMPAR antagonists into the ACC to block excitatory synaptic transmission significantly attenuated abdominal hyperalgesia in CP rats, which was similar to the analgesic effect of endomorphins injected into the ACC. Specifically inhibiting the excitability of ACC pyramidal cells via chemogenetics reduced both hyperalgesia and comorbid anxiety, whereas activating these neurons via optogenetics failed to aggravate hyperalgesia and anxiety in CP rats. Taken together, these findings provide neurocircuit, biochemical, and behavioral evidence for involvement of the ACC in hyperalgesia and anxiety in CP rats, as well as novel insights into the cortical modulation of painful CP, and highlights the ACC as a potential target for neuromodulatory interventions in the treatment of painful CP.