Ten eleven translocation (TET) enzymes, including TET1, TET2 and TET3, convert 5-methylcytosine to 5-hydroxymethylcytosine and regulate gene transcription. However, the molecular mechanism by which TET family enzymes regulate gene transcription remains elusive. Using protein affinity purification, here we search for functional partners of TET proteins, and find that TET2 and TET3 associate with O-linked β-N-acetylglucosamine (O-GlcNAc) transferase (OGT), an enzyme that by itself catalyses the addition of O-GlcNAc onto serine and threonine residues (O-GlcNAcylation) in vivo. TET2 directly interacts with OGT, which is important for the chromatin association of OGT in vivo. Although this specific interaction does not regulate the enzymatic activity of TET2, it facilitates OGT-dependent histone O-GlcNAcylation. Moreover, OGT associates with TET2 at transcription start sites. Downregulation of TET2 reduces the amount of histone 2B Ser 112 GlcNAc marks in vivo, which are associated with gene transcription regulation. Taken together, these results reveal a TET2-dependent O-GlcNAcylation of chromatin. The double epigenetic modifications on both DNA and histones by TET2 and OGT coordinate together for the regulation of gene transcription.