The transcription factor Foxp3 and Stat5 modulate lineage stability and function of regulatory T (Treg) cells to promote immune homeostasis. Here the authors show that O-GlcNAcylation of Foxp3 and Stat5, mediated by O-GlcNAc transferase (OGT), is essential for Treg-mediate immune balance, with Treg-specific deficiency of OGT leading to severe autoimmunity.