O-GlcNAcylation regulates immune cells activation and differentiation. O-GlcNAcylation is associated with the immune surveillance in tumor microenvironment. O-GlcNAcylation regulates the activation and differentiation of T cells and macrophages, thereby exerting signal transduction and immune surveillance. T reg, regulatory T cell; IL-2, interleukin-2; STAT5, signal transducer and activator of transcription 5; TCR, T-cell receptor; NFATc1, nuclear factor of activated T cells 1; MAVS, mitochondrial antiviral-signaling protein; NF-κB, nuclear factor kappa-light-chain-enhancer of activated B cells; TLRs, Toll-like receptors; exp., expression.