Background: Dezocine is a commonly used opioid receptor mixed agonist-antagonist in clinical practice. It has been proven to play a vital effect on the regulation of immune function in cancer patients. However, the latent mechanisms of Dezocine on gastric cancer cell viability and tumor growth in gastric cancer mice remain unclear. Methods: Dezocine's impact on the viability of gastric cancer cells, apoptosis, and apoptosis-related proteins was evaluated through Cell Counting Kit-8 (CCK-8) assay, flow cytometry, and western blot analysis, respectively. The effect of Dezocine on T-helper 1/T-helper 2 (Th1/Th2) cells and inflammatory cytokines was determined by flow cytometry and Enzyme-linked Immunosorbent Assay (ELISA). The role of Dezocine on tumor viability in gastric cancer mice in vivo was also determined. Results: We discovered that Dezocine suppressed gastric cancer (GC) cell viability and accelerated apoptosis in a concentrationdependent pattern. In comparison with control, Dezocine reduced the tumor weight, volume, Th2 cell proportion, and interleukin-10 (IL-10) level. In contrast, it increased Th1 cell proportion, Th1/Th2 ratio, interferon-7 (IFN-7), Tumor Necrosis Factor-alpha (TNF-alpha), and IL-6 levels in the mice with gastric cancer. Furthermore, Dezocine also inhibited the expression of Tumor Necrosis Factor Receptor-Associated Factor 6 (TRAF6), while overexpression of TRAF6 reversed the suppression effect of Dezocine on gastric cancer (GC) cell viability and tumor growth. Conclusions: Dezocine has an anti-GC effect by inhibiting the development of GC by regulating TRAF6, Th1/Th2 balance, and inflammatory cytokines.