We investigate the two-dimensional motion of relativistic cold electrons in the presence of ‘strictly’ spatially varying magnetic fields satisfying, however, no magnetic monopole condition. We find that the degeneracy of Landau levels, which arises in the case of the constant magnetic field, lifts out when the field is variable and the energy levels of spin-up and spin-down electrons align in an interesting way depending on the nature of change of field. Also the varying magnetic field splits Landau levels of electrons with zero angular momentum from positive angular momentum, unlike the constant field which only can split the levels between positive and negative angular momenta. Exploring Landau quantization in non-uniform magnetic fields is a unique venture on its own and has interdisciplinary implications in the fields ranging from condensed matter to astrophysics to quantum information. As examples, we show magnetized white dwarfs, with varying magnetic fields, involved simultaneously with Lorentz force and Landau quantization affecting the underlying degenerate electron gas, exhibiting a significant violation of the Chandrasekhar mass-limit; and an increase in quantum speed of electrons in the presence of a spatially growing magnetic field.