When subjected to high temperatures, cement-based materials can dehydrate, which, in turn, affects the mechanical property of the main binding phase (calcium silicate hydrate) at the atomic scale. However, the effects of high temperature on the tensile and compressive behavior of calcium silicate hydrate (C−S−H) grains under uniaxial loading remains poorly understood. In this work, based on reactive molecular simulations, the tensile strength, compressive strength, and stress-strain relations of C−S−H grains with four calcium/silicon (C/S) ratios (1.10, 1.33, 164, and 1.80) both under and after (residual properties) high temperatures are investigated. It is shown that C−S−H grains can shrink due to the water loss induced by high temperature, and a low C/S ratio can lead to a thermo-stable molecular structure. Meanwhile, the residual tensile strength can be enhanced, particularly the tensile strength in the z-direction. Upon the residual compressive strength, in the x and y directions, high temperature can decrease the residual compressive strength for C/S = 1.10 or 1.33 but has no apparent effect for C/S = 1.64 or 1.80. While in the z-direction, the residual compressive strength can be enhanced due to the reduction in the interlayer space. In addition, high temperature can improve the residual tensile ductility but has no obvious effect on the residual compressive stress-strain relations. As for the mechanical properties under high temperature, both the tensile and compressive strengths can be weakened except that the tensile strength in the z-direction can undergo an increasing trend when the temperature is below 800 K due to significant shrinkage in the z-direction. Moreover, high temperature can make stress-strain curves exhibit good plasticity. Discussion indicates that the strength degradation of C−S−H gels or cement paste exposure to high temperatures is likely caused by the increasing porosity and coarsening of the void or defect size.