A large number of experimental and clinical studies have confirmed that brief remifentanil exposure can enhance pain sensitivity presenting as opioid-induced hyperalgesia (OIH). N-methyl-D-aspartate (NMDA) receptor antagonists have been reported to inhibit morphine analgesic tolerance in many studies. Recently, we found that glycogen synthase kinase-3β (GSK-3β) modulated NMDA receptor trafficking in a rat model of remifentanil-induced postoperative hyperalgesia. In the current study, it was demonstrated that GSK-3β inhibition prevented remifentanil-induced hyperalgesia via regulating the expression and function of spinal NMDA receptors in vivo and in vitro. We firstly investigated the effects of TDZD-8, a selective GSK-3β inhibitor, on thermal and mechanical hyperalgesia using a rat model of remifentanil-induced hyperalgesia. GSK-3β activity as well as NMDA receptor subunits (NR1, NR2A and NR2B) expression and trafficking in spinal cord L4-L5 segments were measured by Western blot analysis. Furthermore, the effects of GSK-3β inhibition on NMDA-induced current amplitude and frequency were studied in spinal cord slices by whole-cell patch-clamp recording. We found that remifentanil infusion at 1 μg·kg(-1)·min(-1) and 2 μg·kg(-1)·min(-1) caused mechanical and thermal hyperalgesia, up-regulated NMDA receptor subunits NR1 and NR2B expression in both membrane fraction and total lysate of the spinal cord dorsal horn and increased GSK-3β activity in spinal cord dorsal horn. GSK-3β inhibitor TDZD-8 significantly attenuated remifentanil-induced mechanical and thermal hyperalgesia from 2 h to 48 h after infusion, and this was associated with reversal of up-regulated NR1 and NR2B subunits in both membrane fraction and total lysate. Furthermore, remifentanil incubation increased amplitude and frequency of NMDA receptor-induced current in dorsal horn neurons, which was prevented with the application of TDZD-8. These results suggest that inhibition of GSK-3β can significantly ameliorate remifentanil-induced hyperalgesia via modulating the expression and function of NMDA receptors, which present useful insights into the mechanistic action of GSK-3β inhibitor as potential anti-hyperalgesic agents for treating OIH.