The change of the pH value, the hydrogen evolution reaction, and their effect on the electrodeposition of Co were investigated directly at the surface of a gold mesh with and without superimposition of a magnetic field of 1 T by cyclic voltammetry and chronoamperometry in 0.1 M Na2SO4 with and without addition of 0.01 CoSO4. The reduction of hydrogen ions is increased by superimposition of a magnetic field oriented parallel to the electrode surface. The increase of the pH value directly at the surface is lower in an applied magnetic field compared to the case without a magnetic field. This is likely to be due to the enhanced convection generated by the Lorentz force. The discharged hydrogen ions are rapidly compensated. The effect of a magnetic field on the limited current density as well as on the change of pH value is more significant at lower initial pH value. For initial pH values of 3 and 3.5 the deposition of Co under a superimposed magnetic field is improved and the increase of the pH value is low in front of the electrode. This leads to a suppression of the spontaneous formation of hydroxides.