Inhibitors of the immune checkpoint molecules PD1 and CTLA4 have been used to enhance the T cell anti-tumor immune response, leading to successful treatment for some tumor types. However, not all patients benefit from treatment with these inhibitors. Recently, it was reported that the gut microbiota boosts the anti-tumor immune response to immune checkpoint therapy. However, the mechanism(s) by which the gut microbiota enhance tumor immunity are not fully understood. Here, by depletion of the gut microbiota, we asked how the microbiota influences the anti-tumor immune response, in particular examining the activation of tumor-specific CD8+ T cells. We found that the number of tumor antigen-specific CD8+ T cells in spleen, and the number of activated CD8+ T cells in draining lymph node and tumor tissue in the absence of the gut microbiota were reduced. Furthermore, tumor-infiltrating CD8+ T cells were impaired in their ability to produce IFNγ. These findings suggest that the gut microbiota contributes to the prevention of exhaustion of tumor-infiltrating CD8+ T cells and to the activation of systemic CD8+ T cells.