How neurons in the medial prefrontal cortex broadcast stress-relevant information to subcortical brain sites to regulate cocaine relapse remains unclear. The lateral habenula (LHb) serves as a “hub” to filter and propagate stress- and aversion-relevant information in the brain. Here, we show that chemogenetic inhibition of cortical inputs to LHb attenuates relapse-like reinstatement of extinguished cocaine seeking in mice. Using an RNA sequencing–based brain mapping procedure with single-cell resolution, we identify networks of cortical neurons that project to LHb and then preferentially innervate different downstream brain sites, including the ventral tegmental area, median raphe nucleus, and locus coeruleus (LC). By using an intersectional chemogenetics approach, we show that inhibition of cortico-habenular neurons that project to LC, but not to other sites, blocks reinstatement of cocaine seeking. These findings highlight the remarkable complexity of descending cortical inputs to the habenula and identify a cortico-habenulo-hindbrain circuit that regulates cocaine seeking.