In low and middle income countries (LMICs), where the burden of neonatal sepsis is the highest, the spread of extended spectrum beta-lactamase-producing enterobacteriaceae (ESBL-PE) in the community, potentially contributing to the neonatal mortality, is a public health concern. Data regarding the acquisition of ESBL-PE during the neonatal period are scarce. The routes of transmission are not well defined and particularly the possible key role played by pregnant women. This study aimed to understand the neonatal acquisition of ESBL-PE in the community in Madagascar. The study was conducted in urban and semi-rural areas. Newborns were included at birth and followed-up during their first month of life. Maternal stool samples at delivery and six stool samples in each infant were collected to screen for ESBL-PE. A Cox proportional hazards model was performed to identify factors associated with the first ESBL-PE acquisition. The incidence rate of ESBL-PE acquisition was 10.4 cases/1000 newborn-days [95% CI: 8.0–13.4 cases per 1000 newborn-days]. Of the 83 ESBL-PE isolates identified, Escherichia coli was the most frequent species (n = 28, 34.1%), followed by Klebsiella pneumoniae (n = 20, 24.4%). Cox multivariate analysis showed that independent risk factors for ESBL-PE acquisition were low birth weight (adjusted Hazard-ratio (aHR) = 2.7, 95% CI [1.2; 5.9]), cesarean-section, (aHR = 3.4, 95% CI [1.7; 7.1]) and maternal use of antibiotics at delivery (aHR = 2.2, 95% CI [1.1; 4.5]). Our results confirm that mothers play a significant role in the neonatal acquisition of ESBL-PE. In LMICs, public health interventions during pregnancy should be reinforced to avoid unnecessary caesarean section, unnecessary antibiotic use at delivery and low birth weight newborns.