In utero infection may critically influence diaphragm development and predispose preterm infants to postnatal respiratory failure. We aimed to determine how frequency and gestational age (GA) at time of intra-amniotic (IA) lipopolysaccharide (LPS) exposure affects preterm diaphragm function. Pregnant ewes received IA injections of saline or 10-mg LPS at 7 days or 21 days or weekly injections 21, 14 and 7 days before delivery at 121-day GA. Foetal lambs were killed with pentobarbitone (150 mg/kg; intravenous). Diaphragm contractile function was measured in vitro. Muscle fibre type, activation of protein synthesis and degradation pathways, pro-inflammatory signalling and oxidative stress were evaluated using immunofluorescence staining, RT-qPCR, ELISA, Western blotting and biochemical assay. In utero LPS exposure significantly impaired diaphragm contractile function. LPS exposure 7 days before delivery caused maximum specific twitch and tetanic forces 30% lower than controls. When the initial LPS exposure occurred 21 days before delivery maximum specific forces were 40% lower than controls. Earlier LPS exposure also prolonged twitch contraction time, increased fatigue resistance and elevated protein carbonyl content. Despite increased white blood cell counts and interleukin-6 mRNA expression following weekly LPS exposure, there were no significant differences in contractile properties between exposure 21 days before delivery and repeated LPS groups suggesting that frequency of inflammatory exposure does not influence the severity of contractile dysfunction. GA at time of initial LPS exposure, rather than frequency of exposure, determines the extent of inflammation-induced diaphragm dysfunction.