Opioid tolerance and the potential for addiction is a significant burden associated with pain management, yet its precise underlying mechanism and prevention remain elusive. Immune signaling contributes to the decreased efficacy of opioids, and we recently demonstrated that Toll-like receptor 4 (TLR4)-mediated neuroinflammation in the periaqueductal gray (PAG) drives tolerance. Tumor necrosis factor (TNF), a product of TLR4 signaling, promotes inflammation and facilitates glutamatergic signaling, key components of opioid tolerance. Therefore, we hypothesize that TLR4-mediated opioid tolerance requires TNF signaling. By expression of a dominant-negative TNF peptide via lentiviral vector injection in rat PAG to sequester soluble TNF (solTNF), we demonstrate that solTNF mediates morphine tolerance induced by TLR4 signaling, stimulates neuroinflammation (increased IL-1β and TLR4 mRNA), and disrupts glutamate reuptake (decreased GLT-1 and GLAST mRNA). We further demonstrate the efficacy of the brain-permeant PEGylated version of the anti-solTNF peptide, XPro1595, injected systemically, to normalize morphine-induced CNS neuroinflammation and morphine- and endotoxin-induced changes in glutamate transport, effectively preserving the efficacy of morphine analgesia and eliminating tolerance. Our findings provide a novel pharmacological target for the prevention of opioid-induced immune signaling, tolerance, and addiction.