Magnetic properties and surface structures of Ni/Cu(100) ultrathin films are studied by means of magneto-optical Kerr effect and in situ scanning tunneling microscopy in combination with cyclic voltammetry. At the initial stage of Ni deposition on a Cu(100) electrode, nickel atoms attach onto the steps and the surface shows single atomic steps corresponding to a layer-by-layer growth. For thicker Ni/Cu(100) films, nanometer-size clusters are randomly distributed on the surface showing a three-dimensional island growth. For thinner Ni layers in the coherent region, the magnetic anisotropy energy of the Cl-electrolyte/Ni interface is small. The reduction of squareness of the hysteresis loops is related to the inhomogeneous growth of the Ni layers. For thicker Ni layers in the incoherent region, the negative value of interface anisotropy for the Cl-electrolyte/Ni interface has a strong impact on perpendicular magnetic anisotropy and plays an important role on the reduction of the Ni thickness for spin reorientation transition in the electrolyte condition. By adding Pb additives, the deposition of a Pb wetting layer causes a defaceting phenomenon and the hydrogen evolution reaction is reduced. As the Ni thickness increases, the growth of Ni changes from layer-by-layer to quasi-two-dimensional islands with a flat top layer. With a Pb additive, the spin reorientation transitions of the Ni/Cu(100) system are not significantly influenced. However, due to the change of the growth mode by Pb atoms as a surfactant, the squareness of the hysteresis loops is enhanced for all the Ni thicknesses.