The purpose of this randomized controlled trial was to evaluate whether early urinary catheter removal is feasible during epidural anesthesia during gastrointestinal surgery in male patients at high risk for urinary retention. Male patients who underwent radical surgery for gastric or colon cancer were enrolled in this randomized controlled trial. Patients were randomized 1:1 into 2 groups: the early group, in which the urinary catheter was removed before removal of the epidural catheter on the second or third postoperative day, and the late group, in which the urinary catheter was removed after removal of the epidural catheter. The randomization adjustment factors were age (≥ 65 or < 65 years) and operative site (gastric or colon). The primary endpoint was urinary retention. The secondary endpoints were the incidence of urinary tract infection and length of postoperative hospital stay. Seventy-three patients were enrolled between March 2020 and February 2024 and assigned to the Early (n = 37) and Late (n = 36) groups. Four patients withdrew their consent after randomization. The intention-to-treat analysis showed that urinary retention occurred in 4 patients (11.1%) in the early group and 1 patient (3.0%) in the late group (P = 0.20). Urinary tract infection occurred in 1 patient (3.0%) in the late group. The median postoperative hospital stay was 9 days in both groups. Early urinary catheter removal in male patients undergoing gastrointestinal surgery with epidural anesthesia could increase urinary retention within the expected acceptable range. UMIN000040468, Date of registration: May 21, 2020.