UDP-galactopyranose mutase (UGM) plays an essential role in galactofuranose biosynthesis in microorganisms by catalyzing the conversion of UDP-galactopyranose to UDP-galactofuranose. The enzyme has gained attention recently as a promising target for the design of new antifungal, antitrypanosomal, and antileishmanial agents. Here we report the first crystal structure of UGM complexed with its redox partner NAD(P)H. Kinetic protein crystallography was used to obtain structures of oxidized Aspergillus fumigatus UGM (AfUGM) complexed with NADPH and NADH, as well as reduced AfUGM after dissociation of NADP(+). NAD(P)H binds with the nicotinamide near the FAD isoalloxazine and the ADP moiety extending toward the mobile 200s active site flap. The nicotinamide riboside binding site overlaps that of the substrate galactopyranose moiety, and thus NADPH and substrate binding are mutually exclusive. On the other hand, the pockets for the adenine of NADPH and uracil of the substrate are distinct and separated by only 6 Å, which raises the possibility of designing novel inhibitors that bind both sites. All 12 residues that contact NADP(H) are conserved among eukaryotic UGMs. Residues that form the AMP pocket are absent in bacterial UGMs, which suggests that eukaryotic and bacterial UGMs have different NADP(H) binding sites. The structures address the longstanding question of how UGM binds NAD(P)H and provide new opportunities for drug discovery.