CD4+ T cells are tightly regulated by microbiota in the intestine, but whether intestinal T cells interface with host-derived metabolites is less clear. Here, we show that CD4+ T effector (Teff) cells upregulated the xenobiotic transporter, Mdr1, in the ileum to maintain homeostasis in the presence of bile acids. Whereas wild-type Teff cells upregulated Mdr1 in the ileum, those lacking Mdr1 displayed mucosal dysfunction and induced Crohn's disease-like ileitis following transfer into Rag1−/− hosts. Mdr1 mitigated oxidative stress and enforced homeostasis in Teff cells exposed to conjugated bile acids (CBAs), a class of liver-derived emulsifying agents that actively circulate through the ileal mucosa. Blocking ileal CBA reabsorption in transferred Rag1−/− mice restored Mdr1-deficient Teff cell homeostasis and attenuated ileitis. Further, a subset of ileal Crohn's disease patients displayed MDR1 loss of function. Together, these results suggest that coordinated interaction between mucosal Teff cells and CBAs in the ileum regulate intestinal immune homeostasis. The role of host-derived intestinal metabolites in mucosal immune regulation is poorly understood. Here, Cao et al. show that effector CD4+ T cells upregulate expression of the xenobiotic transporter, Mdr1, in the ileum to safeguard immune homeostasis, revealing an important immunologic consequence of ileal bile acid reabsorption.