Opioid withdrawal signs, such as hyperalgesia, are manifestations of opioid use disorder that may contribute to opioid seeking and taking. We have previously identified an association between dorsal raphe (DR) neurons and the expression of hyperalgesia during spontaneous heroin withdrawal. Here, we found that chemogenetic inhibition of DR neurons decreased hyperalgesia during spontaneous heroin withdrawal in male and female C57/B6 mice. By neuroanatomy, we identified three major subtypes of DR neurons expressing μ-opioid receptors (MOR) that were activated in hyperalgesia during spontaneous withdrawal, those expressing vesicular GABA transporter (VGaT), glutamate transporter 3 (VGluT3), or co-expressing VGluT3 and tryptophan hydroxylase (TPH). In contrast, we identified a small population of DR-MOR neurons expressing solely TPH, which were not activated in hyperalgesia during spontaneous withdrawal. Collectively, these findings indicate a role of the DR in hyperalgesia during spontaneous heroin withdrawal mediated, in part, by the activation of local MOR-GABAergic, MOR-glutamatergic and MOR-co-releasing glutamatergic-serotonergic neurons. We found that specific chemogenetic inhibition of DR-VGaT neurons blocked hyperalgesia during spontaneous heroin withdrawal in male and female mice. Collectively, these findings indicate that DR-GABAergic neurons play a role in the expression of hyperalgesia during spontaneous heroin withdrawal.