Using the new two-dimensional cranking relativistic mean field (RMF) approach, the shears mechanism of magnetic rotation based on configuration πh121/2νh-211/2 in 142Gd is microscopically and self-consistently examined by investigating the aligning angular momenta of the valence nucleons.