In order to reveal the influence of magnetic field on electrochemical machining, a research method of the influence of rotating magnetic field on hydrogen production from electrolytic water is proposed in this paper. Firstly, taking pure water as electrolyte, this paper selects rigid SPCE water molecular model, constructs the molecular dynamics model under the action of magnetic field, and simulates it. In this paper, the thermodynamics, electric power principle, and electrolytic reaction of hydrogen production from electrolytic water are analyzed, and the working processes of alkaline electrolytic cell, solid oxide electrolytic cell, and solid polymer electrolytic cell are analyzed. Based on solid polymer electrolytic cell, the effects of membrane electrode performance, diffusion layer material, contact electrode plate, electrolytic temperature, and electrolyte types on hydrogen production are analyzed. The experimental results show that the heteroions in the lake electrolyte significantly affect the performance of the membrane electrode, and the number of heteroions in the electrolyte should be controlled during the experiment. The hydrogen production capacity and energy efficiency ratio of the unit are basically not affected by different water flow dispersion. When dilute sulfuric acid electrolyte is selected in the experiment, the concentration should be 0.1%–0.2%; After the proton exchange membrane enters the stable period after the activation period, with the increase of the electrolysis time of tap water, (24 h) the membrane electrode will weaken the catalyst activity and reduce the electrolysis efficiency in the electrolysis process. Furthermore, the correctness of rotating magnetic field on hydrogen production from electrolytic water is verified.