A hybrid-grating-based optical fiber sensor for simultaneously measuring the refractive index (RI) and temperature is proposed. The sensor is fabricated by inscribing a long period grating (LPG) and tilted fiber Bragg grating (TFBG) in the same region of an optical fiber in sequence. The hybrid grating takes advantage of both LPG’s high temperature sensitivity and TFBG’s high RI sensitivity, with consideration of the temperature-insensitive characteristic of wavelength difference between the cladding mode wavelength and core mode wavelength of TFBG. Experiments prove the ability of the sensor to measure the RI and temperature simultaneously. The sensitivities are 606.82 nm/RIU and 268.79 pm °C−1, respectively.