The mechanical properties of rock under high temperature and high geostress are the basic and important information to assess the safety of underground engineering. Based on the environmental conditions of the west route of south-to-north water transfer project in western China, experiments are conducted for a sandstone. The experiments are conducted in stress path of hydrostate, pure shear, and conventional triaxial compression at the temperature of 25°C, 50°C and 70°C. The change of strength and average moduli of the rock with temperatures are studied. By cycle loading and unloading tests, elastic and plastic deformation of the rock are decomposed, it is shown that the plastic deformations of the rock are clearly changed with temperature, while the elastic deformation of the rock seems to be unaffected by the temperature. Moreover, based on the associated plastic flow rule, a constitutive law considering temperature is proposed for the sandstone.