We examine the dynamics of biological nanomotors within a simple model of a rotor having three ion-binding sites. It is shown that in the presence of an external dc electric field in the plane of the rotor, the loading of the ion from the positive side of a membrane (rotor charging) provides a torque leading to the motor rotation. We derive equations for the proton populations of the sites and solve these equations numerically jointly with the Langevin-type equation for the rotor angle. Using parameters for biological systems, we demonstrate that the sequential loading and unloading of the sites lead to the unidirectional rotation of the motor. The previously unexplained phenomenon of fast direction-switching in the rotation of a bacterial flagellar motor can also be understood within our model.