It is estimated that >50% of proteins are glycosylated with sugar tags that can modulate protein activity through what has been called the sugar code. Here we present the first QM/MM calculations of human GalNAc-T2, a retaining glycosyltransferase, which initiates the biosynthesis of mucin-type O-glycans. Importantly, we have characterized a hydrogen bond between the β-phosphate of UDP and the backbone amide group from the Thr7 of the sugar acceptor (EA2 peptide) that promotes catalysis and that we propose could be a general catalytic strategy used in peptide O-glycosylation by retaining glycosyltransferases. Additional important substrate-substrate interactions have been identified, for example, between the β-phosphate of UDP with the attacking hydroxyl group from the acceptor substrate and with the substituent at the C2’ position of the transferred sugar. Our results support a front-side attack mechanism for this enzyme, with a barrier height of 20 kcal mol(-1) at the QM(M05-2X/TZVP//BP86/SVP)/CHARMM22 level, in reasonable agreement with the experimental kinetic data. Experimental and in silico mutations show that transferase activity is very sensitive to changes in residues Glu334, Asn335 and Arg362. Additionally, our calculations for different donor substrates suggest that human GalNAc-T2 would be inactive if 2’-deoxy-Gal or 2’-oxymethyl-Gal were used, while UDP-Gal is confirmed as a valid sugar donor. Finally, the analysis herein presented highlights that both the substrate-substrate and the enzyme-substrate interactions are mainly concentrated on stabilizing the negative charge developing at the UDP leaving group as the transition state is approached, identifying this as a key aspect of retaining glycosyltransferases catalysis.