Background: One of the most common devastating problems that occur after urethroplasty is erection, which causes surgical complications (fistula, wound dehiscence, and surgical graft failure) and the need for repairing the complications. We attempted to compare the effect of continuous epidural infusion of dexmedetomidine and ropivacaine as a post-surgical erection prevention strategy. Objectives: In this study, we aimed to compare the effect of dexmedetomidine and ropivacaine epidural infusion on the incidence of erection after reconstructive urethral surgery. Methods: An RCT was conducted on 45 patients who were scheduled for reconstructive urethral surgery. They were randomly divided into three groups: (1) control (n = 15), (2) epidural dexmedetomidine (n = 15), (3) and epidural ropivacaine (n = 15). The control group received oral medication after surgery according to the conventional method (cyproterone compound tablets 50 mg BD and diazepam tablets 2 mg TDS for a week) to prevent erection. The DEX group received dexmedetomidine as continuous epidural infusion, and the ROP group received ropivacaine in addition to the conventional method. The occurrence of erection during day and night was recorded separately until the seventh day after surgery. Due to the long-time interval between case selection, participants from different groups were not matched with each other. Results: The incidence of erection in the dexmedetomidine group was lower than that in the ropivacaine group per person (0.87) and significantly lower than in the control group (2.8 per person). Also, there was significantly less erection in the ropivacaine group (1.2 per person) than in the control group. Our study showed that erection after surgery significantly decreased with the continuous epidural infusion of dexmedetomidine and ropivacaine. Conclusions: Dexmedetomidine seems to have a significant preventive effect on erection after reconstructive urethral surgery.