© 2015 Asian Pacific Society of Respirology. Background and objective 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. Methods 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. Results 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. Conclusions GA at time of initial LPS exposure, rather than frequency of exposure, determines the extent of inflammation-induced diaphragm dysfunction. We investigated timing and frequency effects of in utero lipopolysaccharide (LPS) exposure on diaphragm function in preterm lambs. LPS exposure earlier in gestation caused extensive alterations to diaphragm function regardless of frequency. Inflammatory exposure during development causes diaphragm dysfunction, which may contribute to respiratory failure in preterm infants.