Background: Necrotizing enterocolitis (NEC) is associated with increased neurodevelopmental impairment. Gut-brain interactions through the brainstem may be central to NEC-related microglia-driven neuroinflammation. Heparin-binding epidermal growth factor-like growth factor (HB-EGF) has intestinal protective properties and is a potential therapy for NEC. The aim of this study is to test the hypothesis that HB-EGF in pregnant rats reduces both NEC incidence and proinflammatory changes in the brainstem microglia of newborn rats. Methods: We compared four experimental groups, HB-EGF + /NEC – , HB-EGF – /NEC – , HB-EGF + /NEC + and HB-EGF – /NEC + , depending on whether HB-EGF was given prenatally, and whether the newborn rats underwent the NEC induction protocol. We stained brainstem microglia and performed fractal analyses to provide objective measures of morphological changes. Results: NEC incidence was lower in the HB-EGF + /NEC + group ( n =64, p <0.005) than in the HB-EGF – /NEC + group. Brainstem microglia of breastfed rats had a larger cell area, perimeter, roughness, and less circularity compared with smaller, denser, compact cells in the NEC + pups ( p <0.0001, n =320 cells). HB-EGF + /NEC + and HB-EGF – /NEC + pups had similar-appearing microglia. Conclusions: Prenatal HB-EGF treatment reduces NEC incidence in neonatal rats. NEC-related proinflammatory changes are seen in microglial cells present in crucial centers controlling the gut-brain pathway. HB-EGF has a growth-promoting effect on healthy microglia in the offspring but does not avert microglial activation in the brainstem of newborn rats with NEC.