In conclusion, melatonin-mediated MT2 weakened GR feedback, suppressed oxidative stress, restored the intestinal microbiota and its metabolites homeostasis, and inactivated the STAT3/AP-1/NF-κB pathway-induced inflammatory response, further improving SD-induced colitis. Here, NFKB1 is linked to colitis.