Naive CD4(+) T cells can differentiate into distinct lineages with unique immune functions. The cytokines TGFβ and IL-6 promote the development of Th17 cells that produce IL-17, an inflammatory cytokine not expressed by other T helper lineages. To further understand how IL-17 production is controlled, we studied an ~120-kb genomic region containing the murine il17a and il17f genes and seven evolutionarily conserved, intergenic noncoding sequences. We show that the +28-kb noncoding sequence cooperates with STAT3, RORγt, and Runx1 to enhance transcription from both il17a and il17f promoters. This enhancer and both promoters exhibited Th17 lineage-specific DNA demethylation, accompanied by demethylation of lysine 27 of histone H3 (H3K27) and increased H3K4 methylation. Loss of DNA methylation tended to occur at STAT3 consensus elements, and we show that methylation of one of these elements in the il17a promoter directly inhibits STAT3 binding and transcriptional activity. These results demonstrate that TGFβ and IL-6 synergize to epigenetically poise the il17 loci for expression in Th17 cells, and suggest a general mechanism by which active STAT3 may be epigenetically excluded from STAT3-responsive genes in non-Th17 lineages.