Inflammatory cytokines produced by activated macrophages largely contribute to the pathological signs of inflammatory bowel disease (IBD). Interleukin-10 (IL-10) is the predominant anti-inflammatory cytokine in the intestine, and its therapeutic efficacy for IBD has been clinically tested. Nevertheless, how the function of IL-10 is regulated in the intestinal microenvironment remains unknown, which largely hinders the further development of IL-10–based therapeutic strategies. Here, we found that the expression of phosphatase Shp2 was increased in colonic macrophages and blood monocytes from IBD patients compared with those from healthy controls. Shp2 deficiency in macrophages protects mice from colitis and colitis-driven colon cancer. Mechanistically, Shp2 disrupts IL-10–STAT3 signaling and its dependent anti-inflammatory response in human and mouse macrophages. Furthermore, a Shp2-inducing role of TNF-α is unveiled in our study. Collectively, our work identifies Shp2 as a detrimental factor for intestinal immune homeostasis and hopefully will be helpful in the future exploitation of IL-10 immunotherapy for IBD.