BackgroundAnesthesia with opioids negatively affects patients’ quality of recovery. Opioid-free anesthesia attempts to avoid these effects. This study aimed to evaluate the effect of opioid-free anesthesia on the quality of recovery, using lidocaine on patients undergoing hysteroscopy.MethodsA parallel-group, randomized, double-blind, controlled trial was conducted in Yichang Central Peoples’ Hospital, Hubei Province, China, from January to April, 2022. We included 90 female patients (age: 18–65 years, American Society of Anesthesiologists Physical Status Class I–II) scheduled for elective hysteroscopy, 45 of whom received lidocaine (Group L), and 45 received sufentanil (Group S). Patients were randomly allocated to receive either lidocaine or sufentanil perioperatively. The primary outcome was the quality of postoperative recovery, which was assessed using the QoR-40 questionnaire (a patient-reported outcome questionnaire measuring the quality of recovery after surgery).ResultsThe two groups were similar in age, American Society of Anesthesiology physical status, height, weight, body mass index, and surgical duration. The QoR scores were significantly higher in Group L than Group S. The incidence of postoperative nausea and vomiting, as well as the time to extubation were significantly lower in Group L than Group S.ConclusionOpioid-free anesthesia with lidocaine achieves a better quality of recovery, faster recovery, and a shorter time to extubation than general anesthesia with sufentanil.Trial registrationThe trial was registered on January 15, 2022 in the Chinese Clinical Trial Registry (http://www.chictr.org.cn/showprojen.aspx?proj=149386), registration number ChiCTR2200055623.(15/01/2022).Supplementary InformationThe online version contains supplementary material available at 10.1186/s12871-023-02152-7.