Inflammatory bowel diseases (IBD) are a group of chronic, non-specific intestinal diseases that could comorbid with varieties of negative emotional constructs, including pain-related negative emotions and trait negative emotions; however, the link between brain functions and different dimensions of negative emotions remains largely unknown. Ninety-eight patients with IBD and forty-six healthy subjects were scanned using a 3.0-T functional magnetic resonance imaging scanner. The amplitudes of low-frequency fluctuation (ALFF), regional homogeneity (ReHo), and degree centrality (DC) were used to assess resting-state brain activity. Partial least squares (PLS) correlation was employed to assess the relationship among abnormal brain activities, pain-related and trait negative emotions. Compared to controls, patients with IBD exhibited higher values of ALFF in the right anterior cingulate cortex (ACC), lower values of ALFF in the left postcentral gyrus, and higher values of DC in the bilateral ACC. Multivariate PLS correlation analysis revealed the brain scores of the ACC were correlated with pain-related negative emotions, the brain salience in the left postcentral gyrus was associated with the higher-order trait depression. These findings can enhance our comprehension of how pain-related negative emotion and trait negative emotion affect the brains of patients with IBD in distinct ways.