Compared with other fiber sensors, the fiber Bragg grating sensors have their unique merits,so they are more widely researched. Based on fiber Bragg grating susceptibility to stress and magnetostriction effect of magnetic materials, the scheme of using the fiber Bragg grating on detection for magnetic field is put forward in this paper. The scheme combines the fiber Bragg grating with magnetostrictive material, realizing the linear relationship of wavelength shift and vertical displacement. The density of magnetic field can be confirmed by measuring wavelength shift of fiber Bragg grating.