Regulatory T (T
reg
) cells suppress effective antitumor immunity in tumor-bearing hosts, thereby becoming promising targets in cancer immunotherapy. Despite the importance of T
reg
cells in tumor immunity, little is known about their differentiation process and epigenetic profiles in the tumor microenvironment (TME). Here, we showed that T
reg
cells in the TME of human lung cancers harbored a completely different open chromatin profile compared with CD8
+
T cells, conventional CD4
+
T cells in the TME, and peripheral T
reg
cells. The integrative sequencing analyses including ATAC, single-cell RNA, and single-cell ATAC sequencing revealed that BATF, IRF4, NF-κB, and NR4A were important transcription factors for T
reg
cell differentiation in the TME. In particular, BATF was identified as a key regulator, which leveraged T
reg
cell differentiation through epigenetically controlling activation-associated gene expression, resulting in the robustness of T
reg
cells in the TME. The single-cell sequencing approaches also revealed that tissue-resident and tumor-infiltrating T
reg
cells followed a common pathway for differentiation and activation in a BATF-dependent manner heading toward T
reg
cells with the most differentiated and activated phenotypes in tissues and tumors. BATF deficiency in T
reg
cells remarkably inhibited tumor growth, and high BATF expression was associated with poor prognosis in lung cancer, kidney cancer, and melanoma. These findings indicate one of the specific chromatin remodeling and differentiation programs of T
reg
cells in the TME, which can be applied in the development of T
reg
cell–targeted therapies.