This research aimed to examine the effectiveness and safety of remimazolam besylate and propofol for keeping patients on long-term mechanical breathing sedated at a moderate level. Adults who required mechanical ventilation for more than 24 hours were randomly assigned to receive either remimazolam besylate or propofol in this pilot study. For optimal sedation, scores on the Richmond Agitation and Sedation Scale (RASS) should be between 3 and 0. The number of hours spent in optimal sedation without further medication was the primary endpoint. Non-ventilator-supported days on day 7, ICU duration of stay and 28-day death were secondary outcomes. Each group consisted of 30 patients. The median age was not different between the remimazolam and propofol groups [60.0 (IQR, 51.5-66.3) vs. 64.0 (IQR, 55.0-69.3) years, respectively, P=0.437], nor was there a significant difference in the length of time the study drug was infused [55.0 (IQR, 28.3-102.0) vs. 41.0 (IQR, 24.8-74.3) hours, respectively, P=0.255]. Remimazolam and propofol groups had comparable median percentages of time in the target RASS range without rescue sedation [73.2% (IQR, 41.5-97.3%) vs. 82.8% (IQR, 65.6-100%), P=0.269]. No significant differences in ventilator-free days on day 7, length of ICU stay, 28-day mortality, or adverse events were found between the 2 groups. This preliminary research revealed that remimazolam besylate was an effective and safe option for long-term sedation in mechanically ventilated patients compared to propofol.