Abstract Background IL-35–producing Bregs and Treg cells critically regulate chronic illnesses worldwide via mechanisms related to disrupting the gut microbiota composition. However, whether the gut microbiota regulates these IL-35+ cells remains elusive. We herein investigated the regulatory effects of the gut microbiota on IL-35+ cells by using genetically modified mouse models of obesity. Results We first found that gut Reg4 promoted resistance to high-fat diet-induced obesity. Using 16S rRNA sequencing combined with LC-MS (liquid chromatography–mass spectrometry)/MS, we demonstrated that gut Reg4 associated with bacteria such as Lactobacillus promoted the generation of IL-35+ B cells through 3-idoleacetic acid (IAA) in the presence of LPS. HuREG4 IECtg mice fed a high-fat diet exhibited marked IL-35+ cell accumulation in not only their adipose tissues but also their colons, whereas decreased IL-35+ cell accumulation was observed in the adipose and colon tissues of Reg4 knockout (KO) mice. We also found that Reg4 mediated HFD-induced obesity resistance via IL-35. Lower levels of IAA were also detected in the peripheral blood of individuals with obesity compared with nonobese subjects. Mechanistically, IAA together with LPS mediated IL-35+ B cells through PXR and TLR4. KO of PXR or TLR4 impaired the generation of IL-35+ B cells. Conclusion Together, IAA and LPS induce the generation of IL-35+ B cells through PXR and TLR4. Video Abstract