We report on the observation of magnetic quantum ratchet effect in metal-oxide-semiconductor field-effect-transistors on silicon surface (Si-MOSFETs). We show that the excitation of an unbiased transistor by ac electric field of terahertz radiation at normal incidence leads to a direct electric current between the source and drain contacts if the transistor is subjected to an in-plane magnetic field. The current rises linearly with the magnetic field strength and quadratically with the ac electric field amplitude. It depends on the polarization state of the ac field and can be induced by both linearly and circularly polarized radiation. We present the quasi-classical and quantum theories of the observed effect and show that the current originates from the Lorentz force acting upon carriers in asymmetric inversion channels of the transistors.