In this paper we study the motion of a charged particle under the action of ABC magnetic fields. In particular, we analyze bifurcation diagrams and the stability of the equilibrium points, the existence of periodic and quasi-periodic trajectories near these equilibria, analytic integrability, and the existence of chaotic invariant sets. Our approach makes use of diverse tools from the theory of Hamiltonian systems, like the Birkhoff normal form, KAM theory, Morales-Ramis theory, and splitting of separatrices. Two interesting consequences of our study are the existence of confinement regions of charges near some magnetic lines and that ABC fields give rise to nonintegrability and chaotic motions. The analysis of the motion of a charge in ABC fields can be interpreted as a model for the motion of plasma charged particles in a tokamak, thus showing the potential interest of this work in applications.