Morphine is an opioid agonist and a nonselective mu, kappa and delta receptor agonist. It is a commonly used analgesic drug for the treatment of acute and chronic pain as well as cancer pain. Morphine is particularly important to address the problem of morphine tolerance. Tcf7l2, known as a risk gene for schizophrenia and autism, encodes a member of the LEF1/TCF transcription factor family. TCF7L2 is an important transcription factor that is upregulated in neuropathic pain models. However, the relationship between TCF7L2 and morphine tolerance has not been reported. In this study, we found that morphine tolerance led to the upregulation of TCF7L2 in the spinal cord, and also led to the upregulation of TCF7L2 expression in glial cells, which promoted inflammation related signal, and activated TLR4 / NF-κB/NLRP3 pathway. In addition, TCF7L2 regulated microglial cell activation induced by chronic morphine treatment. Mechanically, we found that TCF7L2 transcriptionally regulated TLR4 expression, and the depletion of TCF7L2 alleviated morphine tolerance induced by chronic morphine treatment, and further alleviated pain hypersensitivity induced by chronic morphine treatment. We therefore suggested that TCF7L2 regulates the activation of TLR4/ NF-κB/NLRP3 pathway in microglia, and is involved in the formation of morphine tolerance. Our results provide a new idea for the regulation mechanism of morphine tolerance.