IL-22 is a multifaceted cytokine with both pro- and anti-inflammatory functions that is implicated in multiple pathologies. However, the role of IL-22 in maternal-fetal immunity in late gestation is poorly understood. In this study, we first showed that IL-22+ T cells coexpressing retinoic acid–related orphan receptor γt (ROR-γt) are enriched at the human maternal-fetal interface of women with preterm labor and birth, which was confirmed by in silico analysis of single-cell RNA sequencing data. T cell activation leading to preterm birth in mice was preceded by a surge in IL-22 in the maternal circulation and amniotic cavity; however, systemic administration of IL-22 in mice did not induce adverse perinatal outcomes. Next, using an ex vivo human system, we showed that IL-22 can cross from the choriodecidua to the intra-amniotic space, where its receptors (Il22ra1, Il10rb, and Il22ra2) are highly expressed by murine gestational and fetal tissues in late pregnancy. Importantly, amniotic fluid concentrations of IL-22 were elevated in women with sterile or microbial intra-amniotic inflammation, suggesting a dual role for this cytokine. The intra-amniotic administration of IL-22 alone shortened gestation and caused neonatal death in mice, with the latter outcome involving lung maturation and inflammation. IL-22 plays a role in host response by participating in the intra-amniotic inflammatory milieu preceding Ureaplasma parvum–induced preterm birth in mice, which was rescued by the deficiency of IL-22. Collectively, these data show that IL-22 alone is capable of causing fetal injury leading to neonatal death and can participate in host defense against microbial invasion of the amniotic cavity leading to preterm labor and birth.