Regional cortical thickness alterations have been reported in many chronic inflammatory and painful conditions, including inflammatory bowel diseases (IBD) and irritable bowel syndrome (IBS), even though the mechanisms underlying such neuroplastic changes remain poorly understood. In order to better understand the mechanisms contributing to grey matter changes, the current study sought to identify the differences in regional alterations in cortical thickness between healthy controls and two chronic visceral pain syndromes, with and without chronic gut inflammation. 41 healthy controls, 11 IBS subjects with diarrhea, and 16 subjects with ulcerative colitis (UC) underwent high-resolution T1-weighted magnetization-prepared rapid acquisition gradient echo scans. Structural image preprocessing and cortical thickness analysis within the region of interests were performed by using the Laboratory of Neuroimaging Pipeline. Group differences were determined using the general linear model and linear contrast analysis. The two disease groups differed significantly in several cortical regions. UC subjects showed greater cortical thickness in anterior cingulate cortical subregions, and in primary somatosensory cortex compared with both IBS and healthy subjects. Compared with healthy subjects, UC subjects showed lower cortical thickness in orbitofrontal cortex and in mid and posterior insula, while IBS subjects showed lower cortical thickness in the anterior insula. Large effects of correlations between symptom duration and thickness in the orbitofrontal cortex and postcentral gyrus were only observed in UC subjects. The findings suggest that the mechanisms underlying the observed gray matter changes in UC subjects represent a consequence of peripheral inflammation, while in IBS subjects central mechanisms may play a primary role.