Chronic postsurgical pain (CPSP) is a common complication after surgery; however, the underlying mechanisms of CPSP are poorly understood. As one of the most important inflammatory pathways, the Toll-like receptor 4/nuclear factor-kappa B (TLR4/NF-κB) signaling pathway plays an important role in chronic pain. However, the precise role of the TLR4/NF-κB signaling pathway in CPSP remains unclear. In the present study, we established a rat model of CPSP induced by skin/muscle incision and retraction (SMIR) and verified the effects and mechanisms of central and peripheral TLR4 and NF-κB on hyperalgesia in SMIR rats. The results showed that TLR4 expression was increased in both the spinal dorsal horn and dorsal root ganglia (DRGs) of SMIR rats. However, the TLR4 expression pattern in the spinal cord was different from that in DRGs. In the spinal cord, TLR4 was expressed in both neurons and microglia, whereas it was expressed in neurons but not in satellite glial cells in DRGs. Further results demonstrate that the central and peripheral TLR4/NF-κB signaling pathway is involved in the SMIR-induced CPSP by different mechanisms. In the peripheral nervous system, we revealed that the TLR4/NF-κB signaling pathway induced upregulation of voltage-gated sodium channel 1.7 (Nav1.7) in DRGs, triggering peripheral hyperalgesia in SMIR-induced CPSP. In the central nervous system, the TLR4/NF-κB signaling pathway participated in SMIR-induced CPSP by activating microglia in the spinal cord. Ultimately, our findings demonstrated that activation of the peripheral and central TLR4/NF-κB signaling pathway involved in the development of SMIR-induced CPSP.