T helper 17 cells (Th17) are critical for fighting infections at mucosal surfaces; however, they have also been found to contribute to the pathogenesis of multiple autoimmune diseases and have been targeted therapeutically. Due to the role of Th17 cells in autoimmune pathogenesis, it is important to understand the factors that control Th17 development. Here we identify the activating transcription factor 7 interacting protein (ATF7ip) as a critical regulator of Th17 differentiation. Mice with T cell-specific deletion of Atf7ip have impaired Th17 differentiation secondary to the aberrant overproduction of IL-2 with T cell receptor (TCR) stimulation and are resistant to colitis in vivo. ChIP-seq studies identified ATF7ip as an inhibitor of Il2 gene expression through the deposition of the repressive histone mark H3K9me3 in the Il2-Il21 intergenic region. These results demonstrate a new epigenetic pathway by which IL-2 production is constrained, and this may open up new avenues for modulating its production.