Intestinal macrophages are highly adapted to recognize and respond to components of the gut microbiota without provoking an inflammatory response but are critical in host defense against invading intestinal pathogens. However, it is unknown how intestinal macrophages become conditioned to maintain this homeostatic balance. We show here that the intestinal microbiota shapes the regulatory functions of macrophages in the colon, mediating host responses to infections and inflammation. We provide evidence that broad-spectrum antibiotic use disrupts intestinal macrophage homeostasis causing macrophages to become hyper-responsive to bacterial stimulation. Thus, re-colonization of antibiotic-treated mice with conventional microbiota induced intestinal macrophages to produce excess amounts of pro-inflammatory cytokines (TNFα/IL-6/IL-12/IL-1β). This drives a subsequent, macrophage-dependent long-term increase in activated, IFNγ-producing Th1 cells in the colon alongside sustained disruption of the microbiota. The consequences of this dysregulated macrophage activity for T-cell function were demonstrated by enhanced susceptibility of recolonized mice to bacterial infection requiring Th17 responses for clearance (Citrobacter rodentium) and, in addition, for helminth infection requiring Th2 responses for clearance (Trichuris muris). Indeed, colonic T-cell from recolonized mice were defective in the generation of Th17 responses during C. rodentium infection and were unable to generate IL-13-producing Th2 responses during T. muris infection. Administration in vivo of the short-chain fatty acid (SCFA) butyrate (usually generated from dietary fibre by the gut microbiota) partially restored the normal anergy of colonic macrophages to microbial stimulation and abolished the increased Th1 responses after re-colonization. Furthermore, butyrate enabled sufficient Th17 responses to be generated during C. rodentium infection for bacterial clearance. In summary, the gut microbiota is essential for maintaining macrophage-mediated intestinal immune homeostasis, mediated at least in part by a SCFA-dependent pathway. Disruption of the gut microbiota with antibiotics prevents this process, promoting inflammatory cytokine production and enhanced susceptibility to intestinal infections. These data highlight the potential impact of broad-spectrum antibiotic use in human health.