First-principles, all-electron, ab initio calculations have been performed to construct an equivalent potential of water for the electronic structure of glycine (Gly) in solution. The calculation involved three steps. The first step was to search for the minimum-energy geometric structure of the Gly + nH₂O system. The second step was to calculate the electronic structure of Gly with the potential of water molecules via the self-consistent cluster-embedding method (SCCE), based on the result obtained in the first step. The last step was to calculate the electronic structure of Gly with the potential of dipoles after replacing the water molecules with dipoles. The results show that the occupied molecular orbitals of Gly are raised by about 0.0524 Ry on average due to the effect of water. The effect of water can be simulated well using the dipole potential. The equivalent potential obtained can be applied directly to electronic structure calculations of proteins in solution using the SCCE method.