In this review, we will focus on the role of the dynamic expression EZH2 in shaping the epigenetic landscape of CD8+ T cell fate and function, with a particular emphasis on infection and cancer. Here, EZH2 is linked to infection.