Magnetotactic Bacteria (MTB) are the bacteria containing magnetosomes can orient along the geomagnetic field. The motion and dynamics of MTB is significant for its potential applications such as nanoactuators. In this paper, the dynamics of MTB in a magnetic field with high gradient is investigated and a theoretical model is built. MTB is simulated as a magnetic dipole which is exerted by an external magnetic torque, a propulsive force of its flagella and a hydrodynamic resistance. The trajectories and dynamics of MTB are obtained considering the competition among the three torques/forces under different conditions. The new driving mechanism of MTB motion is discussed which may help to design motors or robots in micro/nano scale.