Although modern clinical practices such as cesarean sections and perinatal antibiotics have improved infant survival, treatment with broad-spectrum antibiotics alters intestinal microbiota and causes dysbiosis. Infants exposed to perinatal antibiotics have an increased likelihood of life-threatening infections, including pneumonia. Here, we investigated how the gut microbiota sculpt pulmonary immune responses, promoting recovery and resolution of infection in newborn rhesus macaques. Early-life antibiotic exposure interrupted the maturation of intestinal commensal bacteria and disrupted the developmental trajectory of the pulmonary immune system, as assessed by single-cell proteomic and transcriptomic analyses. Early-life antibiotic exposure rendered newborn macaques more susceptible to bacterial pneumonia, concurrent with increases in neutrophil senescence and hyperinflammation, broad inflammatory cytokine signaling, and macrophage dysfunction. This pathogenic reprogramming of pulmonary immunity was further reflected by a hyperinflammatory signature in all pulmonary immune cell subsets coupled with a global loss of tissue-protective, homeostatic pathways in the lungs of dysbiotic newborns. Fecal microbiota transfer was associated with partial correction of the broad immune maladaptations and protection against severe pneumonia. These data demonstrate the importance of intestinal microbiota in programming pulmonary immunity and support the idea that gut microbiota promote the balance between pathways driving tissue repair and inflammatory responses associated with clinical recovery from infection in infants. Our results highlight a potential role for microbial transfer for immune support in these at-risk infants.