Fiber optic sensing measurements hold significant potential for various applications, but temperature compensation of fiber Bragg grating (FBG) remains a formidable challenge. This paper introduces the utilization of β-eucryptite as an encapsulation material for FBG, exploiting its negative thermal expansion (NTE) property to achieve temperature compensation. A two-point adhesive sealing technique was employed to affix FBG to the β-eucryptite substrate. While bare FBG and sensors encapsulated in 7075 aluminum alloy served as comparison. Experimental outcomes reveal that the FBG encapsulated in β-eucryptite exhibits temperature sensitivities of 1.67 pm/℃ within the temperature ranges of -30°C to 150°C. In contrast, bare FBG and sensor encapsulated with 7075 aluminum alloy display temperature sensitivities of 10.46 pm/°C and 37.31 pm/°C, respectively. The use of β-eucryptite for sensor encapsulation effectively reduces the temperature sensitivity of FBG. This temperature compensation method is straightforward yet promising and has great potential in aerospace and precision instrument measurement.