To evaluate the efficacy and postoperative complications of endoscopic thoracoscopic and laparoscopic radical esophagectomy compared to open surgery in esophageal cancer treatment. This retrospective study included 103 esophageal cancer patients admitted from August 2018 to March 2022, divided into observation (endoscopic surgery) and control (open surgery) groups. We compared intraoperative parameters, postoperative outcomes, immune function, and one-year overall survival (OS). Intraoperative bleeding volume, the retention time of chest tube, postoperative fasting time, and hospital stay in the observation group were smaller than those in the control group (P < .05). The differences were not statistically significant (P > .05) when comparing operative time, the number of intraoperative blood transfusion cases, and the rate of operating room extubation in these 2 groups. The differences were not statistically significant when comparing the amount of resected lymph nodes and the positive rate of incisal edge in these 2 groups (P > .05). There was no statistically significant difference in the complication rates such as pneumonia, pleural effusion, pneumothorax, pulmonary embolism, anastomotic fistula, the leakage of thoracic duct, the injury of RLN and arrhythmia in these 2 groups (P > .05). At 7 days postoperatively, the CD4+ and CD4+/CD8+ in the observation group and the control group were smaller than the preoperative ones in their same groups, and they were larger in the observation group than those in the control group (P < .05); There was no statistically significant difference on the CD8+ in the observation group and the control group at 7 days postoperatively compared with the preoperative ones in their same groups (P > .05). The 1-year postoperative OS rate was 81.63% (40/49) in the observation group and 72.22% (39/54) in the control group, and the difference was not statistically significant when comparing the OS rates of these 2 groups (P = .238, HR = 0.622, 95% CI = 0.279-1.385). Endoscopic thoracoscopic and laparoscopic esophagectomy offers less invasive treatment with significant short-term benefits and better preservation of immune function in esophageal cancer patients, making it a safe and effective surgical option.