The interaction of tetra- and hexa-coordinated compounds of cytosine(C) and guanine(G) with metal cations Ca2+, Mg2+, Mn2+, Ni2+, Cu2+, and Zn2+ have been calculated by using the B3LYP/6-31G method at the 6-31G(d, p) basis set, while the remaining coordination bonds are saturated by water molecules ((H2O)4). All geometries were optimized without symmetry restrictions. Comparing the interaction energies we obtained the orders of selectivity of C and G for the above metal ions as follows: aCu2+>aNi2+>aZn2+>aMg2+>bCu2+>aMn2+>bZn2+>bNi2+ and aCu2+> aNi2+>aZn2+>aMg2+>bCu2+>aMn2+>bZn2+>bNi2, respectively (a, b represent tetra- and hexa-coordinated, respectively), which are in good agreement with the experimental facts. Interaction energies of complexes provide a comparatively reliable quantification of the selectivity of dimethyl phosphate anion for the studied metal ions. In addition, the influence of coordination number and coordination structure on the interaction energy and the variation of ionic energy were discussed sufficiently. After analyzing the interaction energies of two kinds of complexes, the “mutual selectivity”as well as the nature of the interaction between metal ions and ligands was revealed.