Inosine monophosphate dehydrogenase (IMPDH) is an important target for immunosuppressive, antiviral and anticancer therapy. This enzyme catalyzes the key reaction in guanine nucleotide biosynthesis: the conversion of IMP into XMP with the concomitant reduction of NAD. The reaction involves a dehydrogenase step that produces NADH and a covalent E-XMP* intermediate and a hydrolysis step where E-XMP* is converted to XMP. We have solved the structure of the mizoribine monophosphate complex of IMPDH that resembles the transition state for the hydrolysis of E-XMP*. This structure reveals that IMPDH undergoes a large conformational change after NADH departs, transforming the enzyme into a hydrolase. This conformational change positions a mobile flap in the NADH site, with a conserved Arg-Tyr dyad adjacent to E-XMP*. Surprisingly, the Arg-Tyr dyad appears to act as the general base that activates water. The flap competes with drugs such as mycophenolic acid, so that the conformational change also appears to be a major determinant of drug selectivity.