Humans and other animals can sense the negative states of other individuals and respond with prosocial helping behaviour to improve their conditions1,2. Although prosocial helping behaviour is proposed to have an evolutionary root in caring for vulnerable newborn offspring1,3, whether the neural substrates underlying parenting may contribute to adult-directed helping behaviours remains largely unclear. Here we show that mice with higher levels of parenting show more prosocial allogrooming towards stressed adults. The medial preoptic area (MPOA), a brain area involved in parenting behaviour, bidirectionally regulates allogrooming towards stressed conspecifics. Allogrooming and parenting behaviours recruit a partially overlapping neuronal ensemble in the MPOA, are both controlled by an MPOA-to-ventral tegmental area pathway and are associated with dopamine release in the nucleus accumbens. Using activity-dependent labelling, we demonstrate that MPOA neuronal ensembles engaged during parenting behaviours are functionally required for allogrooming. Conversely, MPOA neurons activated during prosocial behaviour are functionally required for pup grooming. Collectively, these findings uncover a neural circuit mechanism of prosocial helping behaviour and reveal partially shared neural substrates between parenting and helping behaviours, suggesting that the neural systems evolved for offspring care may have provided a scaffold for the emergence of broader prosocial support between adults.