CD8+ T cells are critical for the immune response to pathogens and tumors, and CD8+ T cell memory protects against repeat infections. In this study, we identify the activating transcription factor 7 interacting protein (ATF7ip) as a critical regulator of CD8+ T cell immune responses. Mice with a T cell-specific deletion of ATF7ip have a CD8+ T cell-intrinsic enhancement of Il7r expression and Il2 expression leading to enhanced effector and memory responses. Chromatin immunoprecipitation sequencing studies identified ATF7ip as a repressor of Il7r and Il2 gene expression through the deposition of the repressive histone mark H3K9me3 at the Il7r gene and Il2-Il21 intergenic region. Interestingly, ATF7ip targeted transposable elements for H3K9me3 deposition at both the IL7r locus and the Il2-Il21 intergenic region, indicating that ATF7ip silencing of transposable elements is important for regulating CD8+ T cell function. These results demonstrate a new epigenetic pathway by which IL-7R and IL-2 production are constrained in CD8+ T cells, and this may open up new avenues for modulating their production.