Glycosylation is one form of protein modification and plays a key role in protein stability, function, signaling regulation and even cancer. NleB and SseK are bacterial effector proteins and possess glycosyltransferase activity, even though they have different substrate preferences. NleB/SseKs transfer the GlcNAc sugar to an arginine residue of host proteins, leading to reduced NF-B-dependent responses. By combining X-ray crystallography, NMR, molecular dynamics, enzyme kinetic assays and in vivo experiments, we demonstrated that a conserved HEN (His-Glu-Asn) motif in the active site plays a key role in enzyme catalysis and virulence. The lid-domain regulates the opening and closing of the active site and the HLH domain determines the substrate specificity. Our findings provide evidence for the enzymatic mechanism by which arginine can be glycosylated by SseK/NleB enzymes.