The dopamine (DA) hypothesis posits the increase of mesolimbic dopamine levels as a defining commonality of addictive drugs, initially causing reinforcement, eventually leading to compulsive consumption. While much experimental evidence from psychostimulants supports this hypothesis, it has been challenged for opioid reinforcement. Here, we monitor genetically encoded DA and calcium indicators as well as cFos in mice to reveal that heroin activates DA neurons located in the medial part of the VTA, preferentially projecting to the medial shell of the nucleus accumbens (NAc). Chemogenetic and optogenetic manipulations of VTA DA or GABA neurons establish a causal link to heroin reinforcement. Inhibition of DA neurons blocked heroin self-administration, while heroin inhibited optogenetic self-stimulation of DA neurons. Likewise, heroin occluded the self-inhibition of VTA GABA neurons. Together, these experiments support a model of disinhibition of a subset of VTA DA neurons in opioid reinforcement.