Bile acids are lipid-emulsifying metabolites synthesized in hepatocytes and maintained in vivo through enterohepatic circulation between the liver and small intestine1. As detergents, bile acids can cause toxicity and inflammation in enterohepatic tissues2. Nuclear receptors maintain bile acid homeostasis in hepatocytes and enterocytes3, but it is unclear how mucosal immune cells tolerate high concentrations of bile acids in the small intestine lamina propria (siLP). CD4+ T effector (Teff) cells upregulate expression of the xenobiotic transporter MDR1 (encoded by Abcb1a) in the siLP to prevent bile acid toxicity and suppress Crohn’s disease-like small bowel inflammation4. Here we identify the nuclear xenobiotic receptor CAR (encoded by Nr1i3) as a regulator of MDR1 expression in T cells that can safeguard against bile acid toxicity and inflammation in the mouse small intestine. Activation of CAR induced large-scale transcriptional reprogramming in Teff cells that infiltrated the siLP, but not the colon. CAR induced the expression of not only detoxifying enzymes and transporters in siLP Teff cells, as in hepatocytes, but also the key anti-inflammatory cytokine IL-10. Accordingly, CAR deficiency in T cells exacerbated bile acid-driven ileitis in T cell-reconstituted Rag1−/− or Rag2−/− mice, whereas pharmacological activation of CAR suppressed it. These data suggest that CAR acts locally in T cells that infiltrate the small intestine to detoxify bile acids and resolve inflammation. Activation of this program offers an unexpected strategy to treat small bowel Crohn’s disease and defines lymphocyte sub-specialization in the small intestine.