Female secondary school attendance has recently increased in Sub-Saharan Africa; however, the higher likelihood of attending school after puberty has put girls at risk of becoming pregnant while attending school. Using a panel survey designed to capture the transition from adolescence to early adulthood, we analyze whether teenage pregnancy contributes to lower school attainment and cognitive skills among young women in Madagascar. We address the endogeneity between fertility and education decisions by instrumenting early pregnancy with the young woman’s access to condoms at the community level, and her exposure to condoms since she was 15 years old. We control for an extensive set of community social infrastructure characteristics to deal with the endogeneity of program placement. Our instrumental variable results show that having a child increases by 42% the likelihood of dropping out of school and decreases the chances of completing lower secondary school by 44%. This school-pregnancy related dropout is associated with a reduction of 1.1 standard deviations in the Math and French test scores. These results are consistent with hazard model estimations: delaying the first birth by a year increases the probability of current enrollment by 5% and the Math and French test scores by 0.2 standard deviations.