Humidity is an important parameter in many industry fields and accurate humidity measurement is of great significance to improve production efficiency and ensure product quality. This paper presents a sensing model and scheme for utilizing thermoplastic polyimide (PI) coated fiber Bragg grating (FBG). The humidity sensitive PI layer was firstly prepared and coated on the FBG. The humidity calibration experiment was designed to verify the sensor performance based the saturated salt solution method. The experimental results show this FBG humidity sensor can work steady in the relative humidity (RH) condition ranging from 11%RH to 83% RH, with the sensitivity of the sensor less than 2 pm/% RH and measurement uncertainty of ±1% RH in the temperature range of 30 °C to 70 °C. In order to solve the problem that the PI-coated FBG is both sensitive to the humidity and temperature (cross sensitivity problem), a novel method of temperature compensation has been proposed. The method uses the character that the coefficients of expansion of the PI-coated layer for humidity and temperature are linearly superimposed and obtains the temperature compensation coefficient by linear interpolation of the function relationship between the measured temperature and the FBG central wavelength shift. The analysis of experimental data shows that within the temperature variation range of 20 °C, this temperature compensation method can effectively guarantee the average wavelength errors within 0.03 nm without reference grating. In this way, it can extend the FBG humidity measurement under environmental temperature up to 90 °C making it possible for application in the measurement the humidity in the high temperature environment.