Displacements of a miscible magnetic layer in a capillary tube under a moving ring-shaped magnet are studied numerically. The magnet is adjusted dynamically to maintain a constant distance from the front mixing interface on the centerline. Control parameters, such as magnetic strength, effective viscosity variation due to magnetization, diffusion and the position of the magnet, are analyzed systematically. Motion of the magnetic layer is evaluated by two quantitative measurements, i.e. movement of center of gravity and spread of layer width. In general, the moving speed of the center of gravity depends only slightly on the magnetic strength, and is found slower at a higher viscosity ratio and a closer placement to the front interface as well if the magnet is placed amid the layer. A weaker spread occurs in situations of stronger magnetic strength, lower viscosity parameters and also placements near the rear interface. A multi-front finger results if the magnet is positioned ahead of the front interface.