Poverty and teenage pregnancy are common in low‐and‐middle‐income countries and can impede the development of healthy parent‐child relationships. This study aimed to test whether a home‐visiting intervention could improve early attachment relationships between adolescent mothers and their infants living in poverty in Brazil. Analyses were conducted on secondary outcomes from a randomized controlled trial (NCT0280718) testing the efficacy of a home‐visiting program, Primeiros Laços, on adolescent mothers’ health and parenting skills and their infants’ development. Pregnant youth were randomized to intervention (n = 40) or care‐as‐usual (CAU, n = 40) from the first trimester of pregnancy until infants were aged 24 months. Mother‐infant attachment was coded during a mother‐infant interaction when the infants were aged 12 months. Electrophysiological correlates of social processing (mean amplitude of the Nc component) were measured while infants viewed facial images of the mother and a stranger at age 6 months. Infants in the intervention group were more securely attached and more involved with their mothers than those receiving CAU at 12 months. Smaller Nc amplitudes to the mother's face at 6 months were associated with better social behavior at 12 months. Our findings indicate that the Primeiros Laços Program is effective in enhancing the development of mother‐infant attachment.