Background The ultrasound-guided erector spinae plane block is a new regional anesthetic technique providing long-lasting excellent analgesia in addition to hemodynamic stability and minimal rescue analgesic request. Materials and methods Following ethics committee approval, a total of 80 patients aged 36–65 years, American Society of Anesthesiologists physical status I and II undergoing elective transthoracic esophageal surgical procedures were enrolled in this prospective study. The patients were randomized into epidural group: patients who received thoracic epidural anesthesia with injection of 15 ml of bupivacaine 0.25% combined with general anesthesia, followed by 7 ml/h of 0.125% bupivacaine and bilateral erector spinae block group, which were performed with an injection of a total of 15 ml of bupivacaine 0.25% on either side combined with general anesthesia and then 7 ml/h of 0.125% bupivacaine was injected in each catheter 2 h for 24 h postoperatively. The primary end point included postoperative minor complications (hypotension, vomiting, urinary retention) and major complications (mortality). Secondary end points included the extubation time, hospital stay length, pain scores at 4, 8, 12, 18, and 24 h postoperatively, rescue analgesic consumption and patient satisfaction scores. Results Pain scores and the total dose of rescue analgesic were comparable in the two groups. The length of hospital stay was significantly longer in the epidural group compared with the erector group. Satisfaction scores were significantly higher in the erector group compared with the epidural group. There was no significant difference between the study groups regarding time to perform the block, time to extubation, and incidence of postoperative complications except for hypotension which was significantly higher in the epidural group. Conclusion Erector spinae plane block has an outstanding beneficial effect in reducing pain and providing better satisfaction scores with less incidence of complications compared with thoracic epidural anesthesia.