Background: Tumors may induce systemic immune dysfunction, which can be aggravated by surgery and anesthesia/analgesia. Data on the effect of flurbiprofen preemptive analgesia on immune dysfunction is limited. The aim of this study was to investigate the effect of flurbiprofen preemptive analgesia on lymphocytes and natural killer (NK) cells in patients undergoing thoracotomy and thoracoscopy radical esophagectomy, and to explore the analgesic methods suitable for tumor patients.Methods: This was a randomized controlled pilot study of 89 patients with esophageal cancer treated with surgery at the Henan Cancer Hospital between January 1, 2015 and December 31, 2016. The patients were divided into three groups: group 1, thoracotomy; group 2, thoracoscopy and laparoscopic surgery; and group 3, flurbiprofen, thoracoscopy, and laparoscopic surgery. CD3+, CD19 +, NK, CD4+, and CD8+ cells in whole blood were measured by flow cytometry 30 minutes before surgery (T0), at the end of the thoracic section of the procedure (T1), and at the end of the operation (T2). Results: There were no significant differences in CD3+, CD19+, CD8+, NK, and CD4+ cells between the three groups or regarding the time points during the procedure (all P > 0.05). Thoracotomy and thoracoscopy surgery resulted in similar immunological outcomes. Conclusion: Flurbiprofen ester preemptive analgesia did not suppress the immune function in patients and could be a safe analgesic method for patients with esophageal cancer undergoing surgery.