A major challenge for cancer immunotherapy is sustaining T-cell activation and recruitment in immunosuppressive solid tumors. Here, we report that the levels of the Hippo pathway effector Yes-associated protein (Yap) are sharply induced upon the activation of cluster of differentiation 4 (CD4)-positive and cluster of differentiation 8 (CD8)-positive T cells and that Yap functions as an immunosuppressive factor and inhibitor of effector differentiation. Loss of Yap in T cells results in enhanced T-cell activation, differentiation, and function, which translates in vivo to an improved ability for T cells to infiltrate and repress tumors. Gene expression analyses of tumor-infiltrating T cells following Yap deletion implicates Yap as a mediator of global T-cell responses in the tumor microenvironment and as a negative regulator of T-cell tumor infiltration and patient survival in diverse human cancers. Collectively, our results indicate that Yap plays critical roles in T-cell biology and suggest that Yap inhibition improves T-cell responses in cancer.