The interplay between the dysbiotic microbiota and bile acids is a critical determinant for development of a dysregulated immune system in inflammatory bowel disease (IBD). Here we have investigated the fecal bile acid metabolome, gut microbiota composition, and immune responses in IBD patients and murine models of colitis and found that IBD associates with an elevated excretion of primary bile acids while secondary, allo- and oxo- bile acids were reduced in both human and mice models of IBD. These changes correlated with the disease severity, mucosal expression of pro-inflammatory cytokines and chemokines, and reduced inflow of anti-inflammatory macrophages and Treg in the gut. Analysis of bile acids metabolome in the feces allowed the identification of five bile acids: 3-oxo-DCA, 3-oxo-LCA, allo-LCA, iso-allo-LCA and 3-oxo-UDCA, whose excretion was selectively decreased in IBD patients and diseased mice. By transactivation assay and docking calculations all five bile acids were shown to act as GPBAR1 agonists and RORγt inverse agonists, skewing Th17/Treg ratio and macrophage polarization toward an M2 phenotype. In a murine model of colitis, administration of 3-oxo-DCA suffices to reverse colitis development and intestinal dysbiosis in a GPBAR1-dependent manner.In vivoadministration of 3-oxo-DCA to colitic mice also reserves disease severity and RORγt activation induced by a RORγt agonist and IL-23, a Th17 inducing cytokine. These results demonstrated intestinal excretion of 3-oxoDCA, a dual GPBAR1 agonist and RORγt inverse agonist, is reduced in IBD and models of colitis and its restitution protects against colitis development, highlighting a potential role for this agent in IBD management.