Disrupting memories that associate environmental cues with drug experiences holds promise for treating addiction, yet accessing the distributed neural network that stores such memories is challenging. Here, we show that the paraventricular nucleus of the thalamus (PVT) orchestrates the acquisition and maintenance of opiate-associated memories via projections to the central nucleus of the amygdala (CeA) and nucleus accumbens (NAc). PVT→CeA activity associates morphine reward to the environment, whereas transient inhibition of the PVT→NAc pathway during retrieval causes enduring protection against opiate-primed relapse. Using brain-wide activity mapping, we revealed distributed network activities that are altered in non-relapsing mice, which enabled us to find that activating the downstream NAc→lateral hypothalamus (LH) pathway also prevents relapse. These findings establish the PVT as a key node in the opiate-associated memory network and demonstrate the potential of targeting the PVT→NAc→LH pathway for treating opioid addiction.