Heparan sulfate (HS) is a glycosaminoglycan present on the cell surface and in the extracellular matrix, which interacts with diverse signal molecules and is essential for many physiological processes including embryonic development, cell growth, inflammation, and blood coagulation. D-glucuronyl C5-epimerase (Glce) is a crucial enzyme in HS synthesis, converting D-glucuronic acid to L-iduronic acid to increase HS flexibility. This modification of HS is important for protein ligand recognition. We have determined the crystal structures of Glce in apo-form (unliganded) and in complex with heparin hexasaccharide (product of Glce following O-sulfation), both in a stable dimer conformation. A Glce dimer contains two catalytic sites, each at a positively charged cleft in C-terminal α-helical domains binding one negatively charged hexasaccharide. Based on the structural and mutagenesis studies, three tyrosine residues, Tyr(468), Tyr(528), and Tyr(546), in the active site were found to be crucial for the enzymatic activity. The complex structure also reveals the mechanism of product inhibition (i.e. 2-O- and 6-O-sulfation of HS keeps the C5 carbon of L-iduronic acid away from the active-site tyrosine residues). Our structural and functional data advance understanding of the key modification in HS biosynthesis.