Objective This study aimed to assess the contribution of postnatal services to the risk of neonatal mortality, and the relative contributions of antenatal iron/folic acid supplements and postnatal care in preventing neonatal mortality in Indonesia. Design Retrospective cohort study. Setting and participants Data used in this study were the 2002–2007 Indonesia Demographic and Health Surveys, nationally representative surveys. The pooled data provided survival information of 26 591 most recent live-born infants within the 5-years prior to each interview. Primary outcomes Primary outcomes were early neonatal mortality, that is, deaths in the first week, and all neonatal mortality, that is, deaths in the first month of life. Exposures were antenatal iron/folic acid supplementation and postnatal care from days 1 to 7. Potential confounders were community, socio-economic status and birthing characteristics and perinatal healthcare. Cox regression was used to assess the association between study factors and neonatal mortality. Results Postnatal care services were not associated with newborn survival. Postnatal care on days 1–7 after birth did not reduce neonatal death (HR=1.00, 95% CI 0.55 to 1.83, p=1.00) and early postnatal care on day 1 was associated with an increased risk of early neonatal death (HR=1.27, 95% CI 0.69 to 2.32, p=0.44) possibly reflecting referral of ill newborns. Early postnatal care on day 1 was not protective for neonatal deaths on days 2–7 whether provided by doctors (HR 3.61, 95% CI 1.54 to 8.45, p<0.01), or by midwives or nurses (HR 1.38, 95% CI 0.53 to 3.57, p=0.512). In mothers who took iron/folic acid supplements during pregnancy, the risk of early neonatal death was reduced by 51% (HR=0.49, 95% CI 0.30 to 0.79, p<0.01). Conclusions We found no protective effect of postnatal care against neonatal deaths in Indonesia. However, important reductions in the risk of neonatal death were found for women who reported use of antenatal iron/folic acid supplements during pregnancy.