CD8+ T cells are thought to be the primary cytotoxic lymphocytes exerting antitumor effects. However, few studies have focused on the antitumor effects of CD8+ T cell-mediated humoral immunity or on interactions between CD8+ T cells and B cells in hepatocellular carcinoma (HCC). We found that the frequency of IL-21-producing CD8+CXCR5+ T cells was higher in HCC tumor tissue than in peritumoral tissue or peripheral blood from the same patients or in blood from healthy donors. Moreover, CD8+CXCR5+ T cells migrated in response to supernatants from primary HCC (HCC-SN) cells, and HCC-SN cells also powerfully induced CXCR5 expression in CD8+ T cells and IL-21 expression in CD8+CXCR5+ T cells. CD8+CXCR5+ T cells from HCC patients, but not those from healthy individuals, stimulated CD19+ B cells to differentiate into IgG-producing plasmablasts. These findings reveal that CD8+CXCR5+ T cells strongly infiltrate HCC tumors, and their infiltration is predictive of a better prognosis. Surprisingly, moreover, CD8+CXCR5+ T cells produced IL-21, which induced B cells to differentiate into IgG-producing plasmablasts and to play a key role in humoral immunity in HCC.