The interaction between water and soft rock rich in clay minerals is one of the main factors causing damage in soft rock tunnel engineering. The effects of temperature on the atomic structure and water absorption capacities of clay minerals cannot be ignored. In the present study, the influence of temperature on the microstructure of Mg-montmorillonite and the thermal stability of the Mg-montmorillonite (010) surface were calculated based on density functional theory. Furthermore, the adsorption properties of H2O molecules within different coverages (0 < Theta <= 1.0 ML) on the (010) surface were investigated in the temperature range of 0-900 K. First, the volume of Mg-montmorillonite expanded significantly with increasing temperature along the z-axis direction. The surface energy of the Mg-montmorillonite (010) surface decreased with increasing temperature, indicating that the high temperature weakened the interatomic interactions on the surface. Moreover, the calculations demonstrated that H2O molecules could still be stably adsorbed on the Mg-montmorillonite (010) surface at different temperatures, and the order of stable adsorption configurations for a single H2O molecule was hollow > bridge > interlayer bridge > top sites. With increasing coverage of H2O molecules, the adsorption energies increased for the top sites, while decreased for the bridge, hollow, and interlayer bridge sites at high temperature. In addition, the changes in atomic structure and electronic characteristics during water absorption were further explored by calculating the ICOHP, PDOS, and lattice relaxation.