Although bile acids are crucial for the absorption of lipophilic nutrients in the intestine, they are cytotoxic at high concentrations and can cause liver damage and promote colorectal carcinogenesis. The farnesoid X receptor (FXR), which is activated by bile acids and abundantly expressed in enterohepatic tissues, plays a crucial role in maintaining bile acids at safe concentrations. Here, we show that FXR induces expression of Akr1b7 (aldo-keto reductase 1b7) in murine small intestine, colon, and liver by binding directly to a response element in the Akr1b7 promoter. We further show that AKR1B7 metabolizes 3-keto bile acids to 3β-hydroxy bile acids that are less toxic to cultured cells than their 3α-hydroxy precursors. These findings reveal a feed-forward, protective pathway operative in murine enterohepatic tissues wherein FXR induces AKR1B7 to detoxify bile acids.