We here present a theoretical study of the alkaline hydrolysis of methyl p-nitrophenyl phosphate (MpNPP-) in aqueous solution and in the active site of nucleotide pyrophosphatase/phosphodiesterase (NPP). The analysis of our simulations, carried out by means of hybrid quantum mechanics/molecular mechanics (QM/MM) methods, shows that the reaction takes place through different reaction mechanisms depending on the environment. Thus, while in aqueous solution the reaction occurs by means of an ANDN mechanism, the enzymatic process takes place through a DNA N mechanism. In the first case, we found associative transition-state (TS) structures, while in the enzyme TS structures have dissociative character. The reason for this change is rationalized in terms of the very different nature of the electrostatic interactions established in each of the environments: while the aqueous solution reduces the repulsion between the negatively charged reacting fragments, assisting their approach, the NPP active site stabilizes the charge distribution of dissociative TS structures, allowing the reaction to proceed with a significantly reduced free energy cost. Interestingly, the NPP active site is able to accommodate different substrates, and it seems that the nature of the TSs depends on their electronic characteristics. So, in the case of the MpNPP- substrate, the nitro group establishes hydrogen-bond interactions with water molecules and residues found in the outer part of the catalytic site, while the leaving group oxygen atom does not coordinate directly with any of the zinc atoms of the active site. If methyl phenyl phosphate is used as substrate, then the charge on the leaving group is supported to larger extent by the oxygen atom and the phenolate anion can be then coordinated to one of the two zinc atoms present in the active site. © 2010 American Chemical Society.