We experimentally demonstrate a novel all fiber-optic temperature sensor using Molybdenum disulfide (MoS2) nanosheets coated D-shaped fiber (DSF). The DSF exhibits a strong evanescent field interaction with the MoS2 nanosheets which in turn has good optical absorption that results in very high sensitivity. In addition, a few layer MoS2 exhibit high thermal conductivity and therefore highly suitable for temperature sensing. The proposed all fiber temperature sensor was investigated in the temperature range of 26 °C - 83 °C and achieved a maximum optical output power variation of 7 dB. Further, the experimental results show an ultrahigh sensitivity of 0.1211 dB/∘C, a linear correlation coefficient of 99.6 % and a better precision of 0.04 °C. Therefore, the proposed fiber-optic sensor is capable of measuring dynamic temperatures in a harsh environment. © 2017 Elsevier B.V.