Background Necrotizing enterocolitis (NEC) remains a leading cause of morbidity in hospitalized neonates—particularly preterm infants—yet its multifactorial etiology and the relative roles of maternal versus neonatal factors are not fully defined. We assessed whether prematurity, neonatal sepsis, and maternal conditions, including preeclampsia, are independently associated with NEC. Objective To evaluate for associations between maternal and neonatal risk factors and the development of necrotizing enterocolitis (NEC) in hospitalized neonates. Methods This case-control study with a retrospective analytical observational design included 235 neonates hospitalized in the Neonatology Unit of the Víctor Lazarte Echegaray Hospital (HVLE) from 2016 to 2023. Clinical records were randomly selected. Seventy-eight neonates with a confirmed diagnosis of NEC comprised the case group, while 157 neonates without NEC comprised the control group. Various maternal and neonatal factors present in this population were analyzed for potential associations with NEC.The influence of potential confounding variables was also considered. Data collection was carried out through a review of neonatal medical records. Results Multivariate analysis identified three factors significantly associated with NEC. Prematurity (P< 0.05) emerged as the main neonatal risk factor, followed by neonatal sepsis (P<0.05). Among maternal factors, preeclampsia showed a significant association with NEC (P<0.05). These variables were considered independent risk factors for NEC. On the other hand, no statistically significant association was found between NEC and other maternal conditions analyzed in this study, such as maternal obesity, sepsis, gestational diabetes, or chronic hypertension (P>0.05). Conclusion Prematurity and neonatal sepsis are neonatal factors significantly associated with a higher risk of NEC. Likewise, preeclampsia emerged as a significant maternal risk factor associated with NEC.