The invention discloses a magnetic resonance imaging method. The method comprises the following steps: applying a strong polarizing magnetic field to an imaging object, closing the polarizing magnetic field, applying a low-polar encoding magnetic field to the sample, applying a gradient magnetic field to the sample for space coding in this magnetic field, closing the encoding magnetic field, reading magnetic resonance signals by an optomagnetic resonance method in an nT-level magnetic field environment, and rebuilding images. The device comprises a polarizing magnet (101) for generating the polarizing magnetic field with controllable magnetic field, an encoding magnet (102) for generating the encoding magnetic field with the controllable magnetic field, a 3D gradient system (103) for generating the gradient magnetic field, an nT coil (104) for generating the nT-level magnetic field, a magnetic shielding system (105), a radio frequency coil (106), an optomagnetic probe (107), a pulse sequence control system (108) and an image processing computer (109). The imaging object and the optomagnetic probe (107) are arranged in the encoding magnet (102) and the polarizing magnet (101).