Cancer remains a global health burden, shaped by both genetic mutations and epigenetic dysregulation. Epigenetic alteration plays a pivotal role in tumorigenesis, immune response modulation, and the emergence of treatment resistance. This review emphasizes the intricate interplay between epigenetically reprogrammed cancer cells and the tumor microenvironment (TME), a relationship central to the immunoediting concept, which encompasses elimination, equilibrium, and escape phases. This review highlights the significance of CD8+ T cells as potent anticancer agents and discusses the mechanisms by which tumor cells evade immune surveillance and evolve resistance to immunotherapy. Such evasion entails the regulation of inhibitory molecules, antigen presentation machinery, and cytokine milieu. Furthermore, this review explores the complex dynamics culminating in CD8+ T cell dysfunction within the TME. In summary, this work offers insights into the indispensable role of epigenetic mechanisms in bolstering cancer cell survival amidst immunological challenges within the TME.