Underground hydrogen storage (UHS) in depleted oil and gas reservoirs is recognized as the most promising large-scale hydrogen storage method. The hydrogen-water-rock interaction during the long-term storage of hydrogen is an important factor affecting the long-term stability of the formation and evaluating the effect of hydrogen storage. This study focuses on the influence of hydrogen-water-rock interaction on the micromechanical properties and mineral content of different rocks in the process of UHS, compares the differences in the influence of gas medium and water content characteristics on rock properties, and then evaluates the best hydrogen storage conditions. Hydrogen-water-rock interaction can significantly improve the microscopic mechanical properties of rocks and enhance the stability of reservoirs and cap rocks, which is beneficial for long-term hydrogen storage. H2O and H+ are important media for the reaction of H2 with rocks, which can promote the reaction and dissolution of some silicate minerals (such as clay and feldspar) and carbonate minerals. However, H2O and CH4 are more likely to be adsorbed on the surface of hydrophilic inorganic minerals to form water film and gas film, hindering the direct contact of H2 with minerals, which reduces the reaction intensity of hydrogen with rocks, indicating a decrease in hydrogen loss. Compared with sandstone, shale contains a large amount of organic matter and clay. H2 and CH4 will preferentially be adsorbed on the surface of the pores of these substances, reducing the content of hydrogen that contacts and reacts with inorganic minerals, so the reaction intensity of shale is generally weaker than that of sandstone. Considering the influence of hydrogen-water-rock interaction on rock properties and hydrogen loss during long-term hydrogen storage, depleted shale gas reservoirs with less water content and cushion gas such as CH4 may be a better large-scale UHS method than conventional depleted gas reservoirs. This work helps to screen the optimal hydrogen storage conditions and provides a reference for the site selection and construction of UHS in depleted oil and gas reservoirs.