The magnetic part of Lorentz' force law, which describes the force that electric and magnetic fields exert on a point charge, is given by
$$\vec{F}=q\,\dot\;\,\vec{v}\times\vec{B},$$
where $q$ is charge, $\vec{v}$ is the velocity of the moving particle and $\vec{B}$ is the magnetic field. As you can see, the particle has to move in order to be affected by the latter. Furthermore, we can see that the force is given by a cross product between velocity and magnetic field. This means that the resulting force points in a perpendicular direction with respect to the plane spanned by the vectors which are multiplied.
Applying this logic to your example of an electron and two poles, the answer is that it will not be directed towards any of the two, as you have correctly assumed.