We investigate the question discussed in the literature as to whether the magnetic field can perform work using two models that describe interacting magnetic dipoles. In the first model, the dipoles are realized by rigidly rotating charge clouds, whereas in the second model, one of the two dipoles is described by a real macroscopic spin density. The theoretical foundations of the second model are formulated in a recently published paper.
We derive equations of motion and detailed energy balance for both models when the initial magnetic moments are parallel to the connecting line of the initial dipole positions. In this scenario the ``large" dipole remains stationary and generates external magnetic field in which the ``small" dipole is accelerated. The answer to the title question depends on the choice of criteria for ``work of the magnetic field".