Helicobacter pylori infection occurs in more than half of the world's population and is the main cause for gastric cancer. A series of lifestyle and nutritional factors, such as tobacco smoking and obesity, have been found to elevate the risk for cancer development. In this study, we sought to determine the immunological aspects during H. pylori infection and gastric cancer development. We found that B cells from H. pylori-infected patients presented altered composition and function compared to uninfected patients. IL-10-expressing CD24+CD38+ B cells were upregulated in H. pylori-infected patients, contained potent regulatory activity in inhibiting T cell pro-inflammatory cytokine secretion, and responded directly to H. pylori antigen stimulation. Interestingly, in H. pylori-infected smoking subjects and obese subjects, the number of IL-10+ B cells and CD24+CD38+ B cells were reduced compared to H. pylori-infected asymptomatic subjects. Regulatory functions mediated by CD24+CD38+ B cells were also impaired. In addition, gastric cancer positive patients had reduced IL-10-producing B cell frequencies after H. pylori-stimulation. Altogether, these data suggest that in H. pylori-infection, CD24+CD38+ B cell is upregulated and plays a role in suppressing pro-inflammatory responses, possibly through IL-10 production, a feature that was not observed in smoking and obese patients.