Glucose 6-Phosphate Dehydrogenases (G6PDHs) from different sources show varying specificities towards NAD+ and NADP+ as cofactors. However, it is not known to what extent structural determinants of cofactor preference are conserved in the G6PDH family. In this work, molecular simulations, kinetic characterization of site-directed mutants and phylogenetic analyses were used to study the structural basis for the strong preference towards NADP+ shown by the G6PDH from Escherichia coli. Molecular Dynamics trajectories of homology models showed a highly favorable binding energy for residues K18 and R50 when interacting with the 2'-phosphate of NADP+, but the same residues formed no observable interactions in the case of NAD+. Alanine mutants of both residues were kinetically characterized and analyzed with respect to the binding energy of the transition state, according to the kcat/KM value determined for each cofactor. Whereas both residues contribute to the binding energy of NADP+, only R50 makes a contribution (about -1 kcal/mol) to NAD+ binding. In the absence of both positive charges the enzyme was unable to discriminate NADP+ from NAD+. Although kinetic data is sparse, the observed distribution of cofactor preferences within the phylogenetic tree is sufficient to rule out the possibility that the known NADP+-specific G6PDHs form a monophyletic group. While the β1-α1 loop shows no strict conservation of K18, (rather, S and T seem to be more frequent), in the case of the β2-α2 loop, different degrees of conservation are observed for R50. Noteworthy is the fact that a K18T mutant is indistinguishable from K18A in terms of cofactor preference. We conclude that the structural determinants for the strict discrimination against NAD+ in the case of the NADP+-specific enzymes have evolved independently through different means during the evolution of the G6PDH family. We further suggest that other regions in the cofactor binding pocket, besides the β1-α1 and β2-α2 loops, play a role in determining cofactor preference.