Early exposure to antibiotics has been shown to increase risk for poor neurobehavioral development, particularly with regard to attention deficit disorders. Clinically, electroencephalography (EEG) is increasingly used as a biomarker of these deficits. Less is known about the effects of antibiotics on neurobehavioral and neurophysiological outcomes in preterm infants, a population at particularly high risk for attention deficits and perinatal antibiotic exposure. This study examines the effects of perinatal antibiotic exposure on neonatal EEG and attention deficits as measured by the Child Behavior Checklist in 4‐ to 5‐year‐old children who were enrolled in an NICU‐based randomized controlled trial comparing Family Nurture Intervention (FNI) to standard care. Antibiotic‐exposed infants had increased attention problems and there was a main effect of antibiotic exposure such that exposed infants had higher EEG power. This effect was fourfold greater in infants who received standard NICU care compared to those who received the intervention, suggesting a buffering effect of the intervention. We hypothesize that the relationship between antibiotic exposure and altered neurodevelopment may be due to effects of antibiotics on the microbiome, and that FNI may buffer these adverse consequences.