In recent years, observations have found evidence for dust at higher ecliptic latitudes. Different possible explanations for these signatures have been proposed, most commonly assuming that they originate from collisions of young asteroid families. In the present work, we investigate the influence of the interplanetary magnetic field causing strong latitudinal oscillations that may affect the creation and evolution of dust at these latitudes. Using numerical simulations of a charged dust particle affected by the Lorentz force, we analyse the effect of a simplified magnetic field model specifically on the long-term evolution of the orbital plane of the dust grain. Additionally, we demonstrate the significant agreement with the results of the semi-analytical secular-resonant model we have developed for charged particles in co-orbital motion with a planet. We have found that the interplanetary magnetic field determines the three-dimensional distribution of micron-sized dust grains, causing large excursions of the orbital inclination that distribute the particles to high ecliptic latitudes. The strength of these oscillations depends in particular on the particle size and on the distance to the Sun. Farther outwards in the Solar System, the particle amplitudes are larger.