Inflammatory bowel disease (IBD) is strongly related to the occurrence of accumulation of toxic reactive oxygen species (ROS), inflammation of the mucosa, and an imbalance of intestinal microbes. However, current treatments largely focus on a single factor, yielding unsatisfactory clinical outcomes. Herein, we report a biocompatible and IBD-targeted metabolic nanoregulator (TMNR) that synergistically regulates cellular and bacterial metabolism. The TMNR comprises a melanin-gallium complex (MNR) encapsulated within a thermosensitive and colitis-targeting hydrogel, all composed of natural and FDA-approved components. The TMNR confers superior broad-spectrum antioxidant properties, effectively scavenging reactive oxygen species (ROS) and blocking inflammatory signaling pathways. The presence of Ga 3+ in TMNR selectively disrupts iron metabolism in pathogenic microorganisms due to its structural resemblance to the iron atom. Additionally, incorporating a thermosensitive injectable hydrogel enables targeted delivery of TMNR to inflammatory regions, prolonging their retention time and providing a physical barrier function for optimizing IBD treatment efficacy. Collectively, TMNR effectively modulates the redox balance of inflamed colonic epithelial tissue and disrupts iron metabolism in pathogenic microorganisms, thereby eliminating inflammation and restoring intestinal homeostasis against IBD. Hence, this work presents a comprehensive approach for precise spatiotemporal regulation of the intestinal microenvironmental metabolism for IBD treatment.