By using an atomic force microscopy, the friction behavior of a NiTi shape memory alloy is investigated under various temperatures in vacuum environment. Under wearless condition at low loads, the adhesion-dominated friction of NiTi is almost temperature independent. However, while scratch mark appears after friction at high loads, the plough-dominated friction force is found to decrease with the increaase in temperature. Based on a simple contact analysis, the temperature dependent friction behavior of NiTi at high loads may be mainly attributed to the thermoelastic phase transition in NiTi. While temperature increases from 26~100°C, the tensile phase transition stress of NiTi increases from 412~964 MPa, which induces ~27% magnitude decrease in the contact area between the diamond tip and NiTi. It further results in the decrease in the plough-dominated friction force on NiTi.