Epigenetic reprogramming within stemness and effector loci of naïve CD8+ T cells enables active maintenance of the naïve state and rapid shutdown of naïve programming during CD8+ T cell activation. Within naïve CD8+ T cells, stemness gene loci exhibit a permissive chromatin structure with deposition of H3K4me3, H3K27ac, and unmethylated CpG island, which allows their transcription while key effector gene loci are repressed by repressive histone modification such as H3K27me3 and H3K9me3 and methylation of CpG islands. During activation, stemness genes are shut down by activity of DNA methyltransferase 3a (DNMT3a) and repressive histone modifications. Chromatin remodelling within effector loci permits their appropriate expression by permissive histone modification.