Abstract This study aimed to evaluate the impact of peer counselling on early initiation of breastfeeding (EIBF) and exclusive breastfeeding (EBF) rates for mother–infant pairs living in urban slums, Dhaka, Bangladesh. This randomized controlled trial enrolled 350 mother–infant pairs from selected slums between September 2014 and July 2016. The women assigned to intervention group received peer counselling from locally recruited, trained community female volunteers starting in third trimester of pregnancy until 6 months after delivery; control group received no intervention. EIBF, any liquids given after birth, and EBF were compared between groups. Follow‐up was scheduled at enrolment, following childbirth, and every 2 months up to 6 months after delivery. Multiple logistic regressions were used to assess the effect peer counselling and other associated factors on EIBF and EBF practices. EIBF rate was higher in the intervention group than in the control group (89.1% vs. 77.4%, p = .005). More mothers in intervention group were exclusively breastfeeding at 5 months than mothers in the control group (73% vs. 27%, p < .005). Control mothers were twice as likely to not practice EIBF compared with intervention mothers (adjusted odds risk [aOR]: 2.53, CI [1.29, 4.97], p = .007). Overall, caesarean section was associated with an 8.9‐fold higher risk of not achieving EIBF (aOR: 8.90, CI [4.05, 19.55], p < .001). Intervention mothers were 5.10‐fold more likely to practice EBF compared with control mothers (aOR: 5.10, CI [2.89, 9.01], p < .001) at 5 months. This study demonstrates peer counselling can positively influence both EIBF and EBF among mothers living in urban area. KEYWORDS early initiation of breastfeeding, exclusive breastfeeding, intervention, peer counselling, randomized controlled trial