The hexosamine biosynthetic pathway (HBP) produces the essential metabolite UDP-GlcNAc and plays a key role in metabolism, health, and aging. The HBP is controlled by its rate-limiting enzyme glutamine fructose-6-phosphate amidotransferase (GFPT/GFAT) that is directly inhibited by UDP-GlcNAc in a feedback loop. HBP regulation by GFPT is well studied but other HBP regulators have remained obscure. Elevated UDP-GlcNAc levels counteract the glycosylation toxin tunicamycin (TM), and thus we screened for TM resistance in haploid mouse embryonic stem cells (mESCs) using random chemical mutagenesis to determine alternative HBP regulation. We identified the N-acetylglucosamine deacetylase AMDHD2 that catalyzes a reverse reaction in the HBP and its loss strongly elevated UDP-GlcNAc. To better understand AMDHD2, we solved the crystal structure and found that loss-of-function (LOF) is caused by protein destabilization or interference with its catalytic activity. Finally, we show that mESCs express AMDHD2 together with GFPT2 instead of the more common paralog GFPT1. Compared with GFPT1, GFPT2 had a much lower sensitivity to UDP-GlcNAc inhibition, explaining how AMDHD2 LOF resulted in HBP activation. This HBP configuration in which AMDHD2 serves to balance GFPT2 activity was also observed in other mESCs and, consistently, the GFPT2:GFPT1 ratio decreased with differentiation of human embryonic stem cells. Taken together, our data reveal a critical function of AMDHD2 in limiting UDP-GlcNAc production in cells that use GFPT2 for metabolite entry into the HBP.