Perioperative anxiety is one of the main psychological stresses experienced by patients who undergo cancer surgery. The surgery itself inevitably causes a stress response characterized by activation of the sympathetic nervous system and the hypothalamic-pituitary-adrenal axis. Both the perioperative anxiety and surgical stress response lead to increased levels of catecholamines and prostaglandins, which may be related to perioperative suppression of antimetastatic immunity and tumor-promoting alterations in the microenvironment. Hence, we designed this clinical trial to investigate the effect of electroacupuncture in reducing perioperative anxiety and surgical stress response. This is a randomized, single-center, parallel, and controlled clinical trial. Seventy-eight participants between the ages of 35 and 85 with gastric or colorectal cancer who plan to undergo tumorectomy will be randomly divided into an electroacupuncture group and a control group. The primary outcome will be the six-item short form of the State-Trait Anxiety Inventory score. The secondary outcomes will be the Amsterdam Preoperative Anxiety and Information Scale score; levels of plasma cortisol, adrenocorticotropic hormone, interleukin-6, and tumor necrosis factor-α; first exhaust time after surgery; postoperative quality of the recovery-15 score, numeric rating scale for pain score; and dosage of postoperative analgesics. Cumulative studies revealed the efficacy of various types of acupuncture therapy with regard to reducing the anxiety and stress response caused by surgery. We expect that the results of this trial will provide high-quality clinical evidence for the choice of perioperative acupuncture for patients undergoing cancer surgery. https://www.chictr.org.cn, identifier ChiCTR200003 7127.