There is evidence that the developmental trajectory of cortisol secretion in preterm infants is altered, with elevated basal cortisol levels observed postnatally through at least 18 months corrected age (CA). This alteration is possibly due to neonatal pain-related stress. High cortisol levels might contribute to greater risk of impaired neurodevelopment. Since maternal factors are important for the regulation of infant stress responses, we investigated relationships between infant (neonatal pain-related stress, attention, cortisol) and maternal (stress, interactive behaviors) factors at age 8 months CA. We found that interactive maternal behaviors buffered the relationship between high neonatal pain-related stress exposure and poorer focused attention in mothers who self-reported low concurrent stress. Furthermore, in preterm infants exposed to high concurrent maternal stress and overwhelming interactive maternal behaviors, higher basal cortisol levels were associated with poor focused attention. Overall, these findings suggest that maternal factors can influence the cognitive resilience at 8 months of preterm infants exposed to early life stress.