BackgroundAlthough the operation time of hysteroscopy is short, the incidence of postoperative nausea and vomiting is high. The aim of this study was to compare the incidence of postoperative nausea and vomiting in hysteroscopy when remimazolam is combined with remifentanil or alfentanil.MethodsWe conducted a randomized, controlled, double-blind trial. Patients undergoing hysteroscopy were recruited and randomly assigned to either the remimazolam-remifentanil (Group RR) or the remimazolam-alfentanil group (Group RA). All patients in the two groups were started with an induction dose of remimazolam besylate 0.2 mg/kg and then maintained with a dosage of 1.0 mg/kg/h. After induction with remimazolam besylate, in Group RR, remifentanil was infused using a target-controlled infusion system with a target concentration of 1.5 ng/ml and titrated throughout the procedure. In Group RA, infusion of alfentanil was started with an initial bolus dose of 20 µg/kg over 30 s and then maintained at an initial rate of 0.16 µg/kg/min. The primary observation outcome was the incidence rate of postoperative nausea and vomiting. The secondary observation outcomes were the time to awakening, the length of stay in the PACU, the total remimazolam dose and adverse effects, such as low SpO2, bradycardia, hypotension and body movement.ResultsA total of 204 patients were successfully included in this study. The incidence of postoperative nausea and vomiting in Group RR (2/102, 2.0%) was significantly lower than that in Group RA (12/102, 11.8%) (p < 0.05). There was no significant difference in the incidence of adverse events, such as low SpO2, bradycardia, hypotension and body movement, between Groups RR and RA (p > 0.05).ConclusionsRemimazolam-remifentanil causes less postoperative nausea and vomiting than remimazolam-alfentanil in hysteroscopy.Trial registrationClinical trial registration number: ChiCTR2100044177. Full date of the first registration: 12/03/2021.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12871-023-02164-3.