This study was designed to observe the treatment effects of flavokawain B (FKB) on gastric cancer both in SGC-7901 cells and nude mice. When SGC-7901 cells were exposed to 10μ g/mL FKB, cellular proliferative and apoptotic capacities and cell cycle were detected utilizing CCK-8 and flow cytometry assays. The results showed that FKB treatment induced cell apoptosis and G2/M arrest and suppressed cell proliferation for SGC-7901 cells. Western blot results showed that FKB upregulated proapoptotic proteins as well as downregulated antiapoptotic and cell cycle-related proteins in SGC-7901 cells. SMAD4, TGF-β 1, and TSPAN12 proteins were tested in FKB-induced SGC-7901 cells. Following exposure to FKB, SMAD4, TGF-β 1, and TSPAN12 expression was augmented in SGC-7901 cells. si-SMAD4 transfection weakened cell apoptosis and accelerated cell proliferation. Furthermore, FKB reversed the change in apoptotic and cell cycle-related proteins induced by si-SMAD4. A nude mouse tumorigenesis model was constructed, which was treated by FKB. In the nude mouse tumorigenesis model, FKB activated the TSPAN12 expression and TGF-β 1/SMAD4 pathway. Also, FKB treatment prolonged the survival time of nude mice and lowered tumor weight. iNOS and CD86 expression was significantly enhanced, and Arg-1 and CD206 expression was significantly decreased in THP-1 cells cultured in conditioned media from FKB-treated SGC-7901 cells. Additionally, FKB-treated SGC-7901 cells weakened macrophage migration. Collectively, this evidence suggested that FKB accelerated apoptosis and suppressed the proliferation of gastric cancer cells and attenuated M2 macrophage polarization, thereby exerting an anticancer effect on gastric cancer.