In conclusion, our results suggest that (1) treatment with DSS induced depression-like behavior and neuroinflammation in rats via alteration of gut microbiota, (2) supplementation with melatonin reversed depression-like behavior and neuroinflammation via increased SCFA producer and enhanced the integrity of BBB, and (3) administration with melatonin decreased the activation of FXR-FGF15 and ASK1 signaling pathways and contributed to improved metabolic disorder. The gene discussed is MAP3K5; the disease is metabolic disease.