Background For critically ill congenital diaphragmatic hernia (CDH) patients on high frequency oscillatory ventilation (HFOV), extracorporeal membrane oxygenation (ECMO), and/or inhaled nitric oxide (iNO), operative repair in the neonatal intensive care unit (NICU) has been proposed to avoid complications during transport to an operating room (OR). This study compared neonates with CDH who received herniorrhaphy in the NICU or OR, with a subgroup analysis considering only patients supported with ECMO. Methods Patients admitted to the NICU in the first 2 weeks of life at a free-standing children’s hospital between July 2004 and September 2021 were examined. Patients were categorized according to location of CDH repair, and impact on operative complications and survival was compared. Results 185 patients were admitted to the NICU with posterolateral CDH and received operative repair. 48 cases were operated on at the bedside in the NICU and 137 in the OR. Patients repaired in the NICU had higher use of HFOV, pulmonary vasodilators, and ECMO (all P < .001). Children repaired in the NICU experienced significantly higher in-hospital death and overall mortality ( P < .001). However, in multivariate analysis, repair location was not a significant predictor of survival to discharge in patients receiving ECMO. No significant difference in surgical site infection was detected for operative location ( P = .773). Discussion Congenital diaphragmatic hernia repair in the NICU occurred more frequently among higher risk patients who experienced worse survival. The rate of surgical site infection appeared similar overall and across subgroups suggesting adequate sterility and technique for bedside procedures, when necessary, despite restricted access to advanced operative equipment.