The invention relates to a
magnetic field sensor based on a room-temperature two-dimensional
magnetic semiconductor material and a preparation method and application thereof, and the preparation method comprises the steps: arranging two electrodes which are not communicated with each other on an insulating substrate, obtaining a layered iron
gallium tellurium material, transferring the layered iron
gallium tellurium material to the insulating substrate, enabling at least one layered iron
gallium tellurium material to be separated from the insulating substrate, and enabling the layered iron gallium tellurium material to be separated from the insulating substrate. The first product covers the two electrodes at the same time, tetrabutylammonium cations or
oxygen plasmas are used for carrying out an
intercalation reaction on the layered iron gallium tellurium material of the first product, and the layered iron gallium tellurium material of the first product is converted into an intercalated layered iron gallium tellurium material; and performing
vacuum annealing to obtain the
magnetic field sensor. The sensor provided by the invention reflects the
magnetic field intensity by using the polarized light current between the electrodes, and can realize wide-range and high-precision magnetic
field detection.