This study provided a feasible approach for more accurate analysis of rock slope stability under rainfall infiltration. To quantitatively analyse the influence of rainfall on slope stability, we attributed the influence of rainfall on slope stability to the change in pore pressure and the decrease in rock strength due to the effects of water-induced weakening. The variation law of the mechanical behaviour of rock under the effects of water was studied by performing mechanical tests of rock specimens with different water contents. Based on this variation law, functions were established for the water-induced weakening of rock. Based on the theory of unsaturated seepage, functions for simulating the rock slope under the influence of rainfall were established. Two engineering cases were presented to demonstrate the application of the simulation method. The results proved that the proposed simulation method can accurately reflect the changes in the mechanical behaviour and stress-strain distributions of the rock mass in a rock slope under rainfall conditions.