The prevalence of inflammatory diseases is increasing in modern urban societies. Inflammation increases risk of stress-related pathology; consequently, immunoregulatory or antiinflammatory approaches may protect against negative stress-related outcomes. We show that stress disrupts the homeostatic relationship between the microbiota and the host, resulting in exaggerated inflammation. Repeated immunization with a heat-killed preparation of Mycobacterium vaccae, an immunoregulatory environmental microorganism, reduced subordinate, flight, and avoiding behavioral responses to a dominant aggressor in a murine model of chronic psychosocial stress when tested 1-2 wk following the final immunization. Furthermore, immunization with M. vaccae prevented stress-induced spontaneous colitis and, in stressed mice, induced anxiolytic or fear-reducing effects as measured on the elevated plus-maze, despite stress-induced gut microbiota changes characteristic of gut infection and colitis. Immunization with M. vaccae also prevented stress-induced aggravation of colitis in a model of inflammatory bowel disease. Depletion of regulatory T cells negated protective effects of immunization with M. vaccae on stress-induced colitis and anxiety-like or fear behaviors. These data provide a framework for developing microbiome- and immunoregulation-based strategies for prevention of stress-related pathologies.