The infiltration of water into the soil can lead to slope instability, which is one of the important causes of many geological hazards (such as landslides and debris flows). Therefore, the numerical investigation of the soil–water infiltration process provides the prerequisite for the determination of slope stability, which is of great significance for geological hazard prevention. In this study, we propose a deep learning-based approach for a numerical investigation of soil–water vertical infiltration with physics-informed neural networks and perform a comprehensive evaluation and analysis of the soil–water infiltration process in different soil types. In the proposed approach, the partial differential equation for soil–water infiltration is combined with the neural network based on physics-informed neural networks (PINNs) to obtain numerical analysis of the soil–water infiltration process. The results indicate that (1) compared with the traditional numerical method, the PINN-based method for the numerical investigation of soil–water vertical infiltration proposed in this study has a smaller error and can obtain more accurate numerical results. (2) During vertical infiltration of water in the different soil types, the light loam is the fastest, the heavy-loam the second and the medium loam the slowest. medium-loam soils are less susceptible to water infiltration of the three soil types and are more suitable for the filling of artificial slopes and dams. The proposed approach could be employed for the simulation of soil–water infiltration processes, not only for the discrimination of slope stability under rainfall conditions, but also for the selection of artificial slopes and dams to fill soil to prevent slope instability.