Bariatric surgeries, including Roux-en-Y gastric bypass (RYGB) are currently the best treatment for obesity and obesity-related comorbidities, such as type 2 diabetes. However, the underlying mechanism of bariatric surgeries is not entirely understood. Further investigations are needed to improve the success rate and achieve sustained health benefits. Given that B cell dysregulation is a critical component of etiology in inflammatory diseases, whereas obesity and type 2 diabetes represent two major inflammatory disorders, we investigated the effect of RYGB on B cell inflammation. We found that B cells after RYGB presented significantly elevated frequency of interleukin (IL)-10-producing cells and reduced frequency of IL-6-producing cells compared to those before RYGB. When grouping B cell subsets into regulatory (secreting IL-10 and transforming growth factor beta [TGF-β]) and effector (secreting IL-2, IL-4, IL-6, IL-12, interferon gamma [IFN-γ] and tumor necrosis factor alpha [TNF-α]) types, we found that after RYGB, the regulatory to effector B cell ratio was significantly increased. Function analyses showed that B cells before RYGB supported IL-17 secretion from T cells whereas these cells after RYGB lost such capacity. B cells after RYGB also gained the capacity to suppress T cell IFN-γ production through TGF-β-mediated effects, a feature not present in B cells before RYGB. Interestingly, the regulatory to effector B cell ratio was directly associated with the reductions in obesity markers following RYGB, such as BMI and fat mass percentage. Together, these results demonstrated a potential mechanism through which RYGB promoted amelioration of obesity and type 2 diabetes.