Preterm birth is widespread and causes 35% of all neonatal deaths. Infants who survive face potential long-term complications. A major contributing factor of preterm birth is infection. We investigated the role of interleukin 22 (IL22) as a potential clinically relevant cytokine during gestational infection. IL22 is an effector molecule secreted by immune cells. While the expression of IL22 was reported in normal nonpregnant endometrium and early pregnancy decidua, little is known about uterine IL22 expression during mid or late gestational stages of pregnancy. Since IL22 has been shown to be an essential mediator in epithelial regeneration and wound repair, we investigated the potential role of IL22 during defense against an inflammatory response at the maternal-fetal interface. We used a well-established model to study infection and infection-associated inflammation during preterm birth in the mouse. We have shown that IL22 is upregulated to respond to an intrauterine lipopolysaccharide administration and plays an important role in controlling the risk of inflammation-induced preterm birth. This paper proposes IL22 as a treatment method to combat infection and prevent preterm birth in susceptible patients.