Objective: To investigate the impact of propofol epidural anesthesia on indexes such as T lymphocytes, NK cells and inflammatory factors in patients undergoing gastric cancer surgery. Methods: Eighty patients undergoing laparoscopic radical gastrectomy were randomly divided into the control group and the observation group, with 40 cases in each group. The control group was given propofol intravenous anesthesia, while the observation group was given propofol epidural anesthesia. The anesthetic indexes, mean arterial pressure (MAP), bispectral index (BIS), level of serum inflammatory mediators, level of T lymphocytes, level of NK cells and safety analysis were observed during anesthesia. Results: The anesthesia onset time, complete block time, time to resume spontaneous breathing and orientation recovery time in the observation group were reduced, and there was a difference compared with the control group (P<0.05). MAP before anesthesia (T0), after tracheal intubation (T1), at 30 min during operation (T2), at 60 min during operation (T3) and at the end of the operation (T4) all had a relatively small overall fluctuation. MAP at T2 and T3 in the observation group was lower than that in the control group (P<0.05). BIS value at T2 and T3 in the observation group was lower than that in the control group (P<0.05). Compared with the control group, the expression of IL-6 and TNF-alpha in the observation group decreased after tracheal intubation (S1), 1 d after the operation (S2), 3 d after the operation (S3), 5 min after extubation (S4) (P<0.05), while there was no significant difference at other time points (P>0.05). For pairwise comparison within each group, IL-1 beta, IL-6 and TNF-alpha level at S1 and S2 were upregulated compared with those at S0, and IL-1 beta, IL-6 and TNF-alpha level at S3 and S4 were downregulated compared with those at S2 (P<0.05). CD3+ T cells levels at S1, S2, S3 showed a downward trend compared to S0 (P<0.05). Compared with the control group, CD4+ T cells level at S4 increased (P<0.05). CD4+ T cells levels at S3 in the two groups both increased compared with those at S1 and S2, and CD4+ T cells levels at S4 in the two groups both increased compared with those at S1, S2 and S3 (P<0.05). Compared with the control group, CD8+ T cells levels at S3 and S4 in the observation group decreased. CD8+ T cells levels at S1, S2, S3 showed a downward trend compared to S0 (P<0.05), while those at S4 showed an upward trend compared to S1 (P<0.05). Compared with the control group, the CD4+/CD8+ at S4 in the observation group increased (P<0.05). Compared with the control group, NK cells levels at S1-S4 increased (P<0.05), and NK cells levels at S1, S2, S3 showed a downward trend compared to S0 (P<0.05). The incidence of adverse reactions in the observation group was lower than that in the control group (P<0.05). Conclusion: The anesthetic effect of propofol epidural anesthesia was better than that of intravenous anesthesia in patients undergoing gastric cancer surgery. The main performance was that the expression of inflammatory mediators such as IL-1 beta, IL-6, TNF-alpha decreased at different time points before and after anesthesia, the proportion of CD4+ T cells, CD4+/CD8+ and NK cells increased, and the adverse reactions were less, which makes propofol epidural anesthesia worthy of clinical promotion.