Background: Patients with hepatic cirrhosis are frequently screened for the complications of portal vein hypertension using upper endoscopy. The current study aimed to compare the efficacy and safety of midazolam and propofol for sedation in patients with cirrhosis undergoing upper endoscopy. Methods: This single-blind randomized clinical trial included 60 cirrhotic patients aged 18-80 years referred to Shahid Mohammadi hospital, Bandar Abbas, Iran from May 22, 2019, to May 21, 2020, for upper endoscopy. The age, gender, weight, and height of the patients were recorded, and they were randomized into two groups. Patients in the midazolam group (n=30) received 0.05 mg/ kg midazolam for induction which continued with a 1 µg/kg/min dose, and those in the propofol group received 1 mg/kg propofol which continued with a 25-75 µg/kg/min dose. Blood pressure, oxygen saturation (SpO2 ), respiratory rate (RR), and heart rate (HR) were measured before induction, immediately, 1, and 5 minutes after induction, and in the recovery unit. Finally, the time to reach the target sedation (Ramsay sedation scale≥5), sedation duration, and recovery time were noted as well. Results: Patients in both groups were comparable regarding age, gender, weight, and height. There were no significant differences between groups regarding hemodynamic parameters at any given time point, except for RR 1 minute after induction, which was significantly higher in the propofol group (P=0.012). Changes in HR from baseline to recovery were significant in both groups. Moreover, changes in SpO2 from baseline to recovery were only significant in the midazolam group (P<0.001). The time to reach the target sedation and sedation duration were significantly lower in the propofol group (P<0.001 and P=0.003, respectively); however, there was no significant difference between groups with regard to the recovery time. Grade II encephalopathy (West Haven criteria) developed in one patient in the midazolam group. Conclusion: Based on the results of the current study, although propofol was superior to midazolam for upper endoscopy in cirrhotic patients with respect to the time to reach the target sedation and sedation duration, the two drugs were rather comparable in terms of hemodynamic stability. However, hepatic encephalopathy with midazolam remains a major concern.