The time-varying electric fields generated by continuously pumping and transmitting calcium, potassium and sodium ions in cells not only affect the discharge activity of neurons, but also induce time-varying magnetic fields to further regulate the fluctuation of ions. According to the Maxwell's electromagnetic field theory, time-varying electric field and magnetic field can stimulate each other in the electrophysiological environment inside and outside the cells to produce electromagnetic field. In order to explore the discharge rhythm transition of neurons under the influence of electromagnetic fields, a five-dimensional (5D) HR neuron model (EMFN model for short) is established by introducing magnetic flux variable and electric field variable into a three-dimensional (3D) Hindmarsh-Rose (HR) neuron model. Firstly, the equilibrium distribution and global bifurcation properties of EMFN model are analyzed by Matcont software, then the existence of subcritical Hopf bifurcation, hidden discharge, coexistence of periodic discharge and resting state are found and analyzed. Secondly, by using the tools of two-parameter and one-parameter bifurcation, ISI bifurcation and the maximum Lyapunov exponent for numerical simulation, the period-adding bifurcation with and without chaos, mixed mode discharge and coexistence mode discharge in the EMFN model are analyzed in detail. At the same time, the transition law of discharge rhythm with the influence of electric field and magnetic field intensity is revealed. Finally, the Washout controller is used to convert the subcritical Hopf bifurcation into supercritical Hopf bifurcation, so the topological structure of EMFN model near the bifurcation point is changed for eliminating the hidden discharge. The research results of this paper confirm that the novel neuron model has rich discharge rhythm, which will affect the information transmission and coding, and provide some ideas for improving the neuron models, revealing the influence of electromagnetic field on biological nervous system, and exploring the pathogenic mechanism of some neurological diseases.