Upon activation, naive CD4+ T cells differentiate into distinct T cell subsets via processes reliant on epigenetically regulated, lineage-specific developmental programs. Here, we examined the function of the histone methyltransferase SETDB1 in T helper (Th) cell differentiation. Setdb1-/- naive CD4+ T cells exhibited exacerbated Th1 priming, and when exposed to a Th1-instructive signal, Setdb1-/- Th2 cells crossed lineage boundaries and acquired a Th1 phenotype. SETDB1 did not directly control Th1 gene promoter activity but relied instead on deposition of the repressive H3K9me3 mark at a restricted and cell-type-specific set of endogenous retroviruses (ERVs) located in the vicinity of genes involved in immune processes. Refined bioinformatic analyses suggest that these retrotransposons regulate Th1 gene cis-regulatory elements or act as Th1 gene enhancers. Thus, H3K9me3 deposition by SETDB1 ensures Th cell lineage integrity by repressing a repertoire of ERVs that have been exapted into cis-regulatory modules to shape and control the Th1 gene network.