The interactions of the four typical nucleotides with the metal ions Mg2+, Ca2+, Mn2+, Na+, and K+ were studied by using the B3LYP/6-311++G(d,p)//B3LYP/6-31G(d,p) calculations in the PCM model. A lot of initial binding sites of the metal ions were designed and optimized to determine the most stable structures of the metal ion nucleotide compounds. It has been shown that the metal ions tend to attach at the center of the negatively charged atoms of the nucleotides. Furthermore, the vertical excitation energies of the metal ion nucleotide compounds were calculated at the same level with the TDDFT method, and also NBO charges were analyzed to understand the bonding characteristics between the metal ions and the nucleotides. That was also compared with the conclusion in the gas phase.