Refractive index (RI) is a fundamental environmental parameter used in environmental monitoring, food production and medical testing. However, the RI is closely related to temperature (T) and changes with temperature. Therefore, we propose a highly sensitive cascaded fiber Surface Plasmon Resonance (SPR) sensor with temperature compensation. The surfaces of the two sensing channels are deposited with different thicknesses of gold film and silver film and modified by three layers of MoS2 to improve the sensor's sensitivity. Channel A is responsible for refractive index sensing, and polydimethylsiloxane (PDMS) is coated on the surface of channel B for temperature sensing. The refractive index sensitivity of the sensor is 3820 nm/RIU, when environment RI varies in the range of 1.34 similar to 1.38. The temperature sensitivity of the sensor is-5.189 nm/degrees C, when temperature varies in the range of 20 similar to 80 degrees C. Compared with previous studies, the sensitivity of this paper has been significantly improved, especially in temperature detection. The accuracy of refractive index sensing can be improved by temperature compensation. The high-precision measurement and high-precision detection of this sensor can be used for biosensing, food production and medical testing.