Background. The efficacy and adverse reactions of remimazolam besylate (RB) in combination with alfentanil in patients with painless gastroscopy remain unclear. Objective. The aim of the study is to observe the efficacy and adverse reactions of RB in combination with alfentanil in patients with painless gastroscopy RB. Methods. All patients were randomly divided into two groups: RB combined with the alfentanil group (research group) and propofol combined with the alfentanil group (control group). After full oxygen inhalation and electrocardiographic monitoring, the research group was given 10 μg/Kg alfentanil + RB 0.2 mg/kg intravenously, and the control group was given 10 μg/Kg alfentanil + propofol 1.5 mg/kg. If there is a clinical need, the research group was given 2.5 mg/additional RB, whereas the control group was treated with an additional 0.5 mg/kg propofol. Main outcome measures were as follows: The vital endpoints including diachronic changes in heart rate (HR), blood pressure (BP), respiratory rate (RR), blood oxygen saturation (SPO2), end-expiratory carbon dioxide (etCO2), IPI, modified observer’s assessment of alert/sedation (MOAA/S), time-related endpoints, perioperative adverse events, endoscopy, and anesthesiologist satisfaction, and 24-hour follow-up of adverse reactions, IPI scores, and satisfaction were recorded. Results. The HR and BP of the patients in the research group and the control group decreased, with a greater decrease in the control group, and the difference was statistically significant (
p
< 0.05). The values of RR, PETCO2, and IPI in the research group and the control group decreased to the lowest at 2–3 min but the decrease in the control group was more significant. Furthermore, there was no significant difference in the time from the completion of administration to 4 minutes of IPI and the total examination time, but the awakening time in the research group was slightly longer than that in the control group, and the difference was statistically significant (
p
< 0.05). The incidences of respiratory depression and hypotension during the operation were shown to be markedly smaller in the investigation relative to the control team, and the difference was statistically significant (
p
< 0.05), whereas the occurrence of cough, movements, and singultus was more common in the investigations, and the difference was statistically significant (
p
< 0.05). The results of the 24-hour follow-up showed that the adverse reactions such as nausea, dizziness, fatigue, abdominal pain, and abdominal distension were much less frequent in the study team, and the difference was statistically significant (
p
< 0.05), and the patient satisfaction was higher than in the control group, and the difference was statistically significant (
p
< 0.05). The regression results showed that age, sedative, and total dose of analgesia had significant effects on the results, and the covariance coefficient of sedative was 1.57 of IPI score in the research group higher than that of the control group. Conclusions. RB combined with alfentanil can provide safe and effective sedation for patients undergoing painless gastroscopy. Compared with propofol, RB and alfentanil for injection can avoid large hemodynamic fluctuations and deep sedation, and have fewer adverse reactions. However, the cases involved in this study are all from a single-center data, which requires further multicenter research and conformation.