Loss of antimicrobial proteins such as REG3 family members compromises the integrity of the intestinal barrier. Here, we demonstrate that overproduction of REG3 proteins can also be detrimental by reducing a protective species in the microbiota. Patients with inflammatory bowel disease (IBD) experiencing flaresdisplayed heightened levels of secreted REG3 proteins that mediated depletion of Enterococcus faecium (Efm) from the gut microbiota. Efm inoculation of mice ameliorated intestinal inflammation through activation of the innate immune receptor NOD2, which was associated with the bacterial DL-endopeptidase SagA that generates NOD2-stimulating muropeptides. NOD2 activation in myeloid cells induced interleukin-1β (IL-1β) secretion to increase the proportion of IL-22-producing CD4+ T helper cells and innate lymphoid cells that promote tissue repair. Finally, Efm was unable to protect mice carrying a NOD2 gene variant commonly found in IBD patients. Our findings demonstrate that inflammation self-perpetuates by causing aberrant antimicrobial activity that disrupts symbiotic relationships with gut microbes.