Background and Objectives: The effects of midazolam, a benzodiazepine, on pain perception are complex on both spinal and supraspinal levels. It is not yet known whether remimazolam clinically attenuates or worsens pain. The present study investigated the effect of intraoperative remimazolam on opioid-induced hyperalgesia (OIH) in patients undergoing general anesthesia. Materials and Methods: The patients were randomized into three groups: group RHR (6 mg/kg/h initial dose followed by 1 mg/kg/h remimazolam and 0.3 μg /kg/min remifentanil), group DHR (desflurane and 0.3 μg /kg/min remifentanil) or group DLR (desflurane and 0.05 µg/kg /min remifentanil). The primary outcome was a mechanical hyperalgesia threshold, while secondary outcomes included an area of hyperalgesia and clinically relevant pain outcomes. Results: Group RHR had a higher mechanical hyperalgesia threshold, a smaller hyperalgesia postoperative area at 24 h, a longer time to first rescue analgesia (p = 0.04), lower cumulative PCA volume containing morphine postoperatively consumed for 24 h (p < 0.01), and lower pain intensity for 12 h than group DHR (p < 0.001). However, there was no significant difference in OIH between groups RHR and DLR. Conclusions: Group RHR, which received remimazolam, attenuated OIH, including mechanically evoked pain and some clinically relevant pain outcomes caused by a high dose of remifentanil. Further research is essential to determine how clinically meaningful and important the small differences observed between the two groups are.