Magnetic field quantization is an important issue for degenerate environments such as neutron stars, radio pulsars and magnetars etc., due to the fact that these stars have a magnetic field higher than the quantum critical field strength of the order of $4.4\times 10^{13}~\text{G}$ , accordingly, the cyclotron energy may be equal to or even much more than the Fermi energy of degenerate particles. We shall formulate here the exotic physics of strongly magnetized neutron stars, known as pulsars, specifically focusing on the outcomes of the quantized magnetic pressure. In this scenario, while following the modified quantum hydrodynamic model, we shall investigate both linear and nonlinear fast magnetosonic waves in a strongly magnetized, weakly ionized degenerate plasma consisting of neutrons and an electron–ion plasma in the atmosphere of a pulsar. Here, linear analysis depicts that sufficiently long, fast magnetosonic waves may exist in a weakly dispersive pulsar having finite phase speed at cutoff. To investigate one-dimensional nonlinear fast magnetosonic waves, a neutron density expression as a function of both the electron magnetic and neutron degenerate pressures, is derived with the aid of Riemann’s wave solution. Consequently, a modified Korteweg–de Vries equation is derived, having a rarefractive solitary wave solution. It is found that the basic properties such as amplitude, width and phase speed of the fast magnetoacoustic waves are significantly altered by the electron magnetic and the neutron degenerate pressures. The results of this theoretical investigation may be useful for understanding the formation and features of the solitary structures in astrophysical compact objects such as pulsars, magnetars and white dwarfs etc.