A growing body of evidence from neuroimaging studies suggests that inflammatory bowel disease (IBD) is associated with functional and structural alterations in the central nervous system and that it has a potential link to emotional symptoms, such as anxiety and depression. However, the neurochemical underpinnings of depression symptoms in IBD remain unclear. We hypothesized that changes in cortical gamma‐aminobutyric acid (GABA+) and glutamine (Glx) concentrations are related to cortical thickness and resting‐state functional connectivity in IBD as compared to healthy controls. To test this, we measured whole‐brain cortical thickness and functional connectivity within the medial prefrontal cortex (mPFC), as well as the concentrations of neurotransmitters in the same brain region. We used the edited magnetic resonance spectroscopy (MRS) with the MEGA‐PRESS sequence at a 3 T scanner to quantitate the neurotransmitter levels in the mPFC. Subjects with IBD (N = 37) and healthy control subjects (N = 32) were enrolled in the study. Compared with healthy controls, there were significantly decreased GABA+ and Glx concentrations in the mPFC of patients with IBD. The cortical thickness of patients with IBD was thin in two clusters that included the right medial orbitofrontal cortex and the right posterior cingulate cortex. A seed‐based functional connectivity analysis indicated that there was higher connectivity of the mPFC with the left precuneus cortex (PC) and the posterior cingulate cortex, and conversely, lower connectivity in the left frontal pole was observed. The functional connectivity between the mPFC and the left PC was negatively correlated with the IBD questionnaire score (r = −0.388, p = 0.018). GABA+ concentrations had a negative correlation with the Hamilton Depression Scale (HAMD) score (r = −0.497, p = 0.002). Glx concentration was negatively correlated with the HAMD score (r = −0.496, p = 0.002) and positively correlated with the Short‐Form McGill Pain Questionnaire score (r = 0.330, p = 0.046, uncorrected). There was a significant positive correlation between the ratio of Glx to GABA+ and the HAMD score (r = 0.428, p = 0.008). Mediation analysis revealed that GABA+ significantly mediated the main effect of the relationship between the structural and functional alterations and the severity of depression in patients with IBD. Our study provides initial evidence of neurochemistry that can be used to identify potential mechanisms underlying the modulatory effects of GABA+ on the development of depression in patients with IBD.