Many landslides occur on the slopes due to heavy rainfalls that are considered a major triggering reason. It is a novel study on simulating flood flow over a slope inside a partial layer of different porous structures. This work will serve in constructing the flood defense, coastal area defense, and preventing massive landslides. The mesh-free nature of the incompressible smoothed particle hydrodynamics (ISPH) method helps in handling the large deformation of nonlinear free surface flow over different porous structures. The ISPH simulation and the artificial neural network (ANN) model are used to anticipate wavefront tracking of dam breach flow over different porous materials. The precise alignment of the ANN model prediction values with the goal values shows that the current ANN model can accurately estimate wavefront tracking. The linear and nonlinear factors of non-Darcy porous media are applied in the momentum equation. The dam break over a porous structure in the horizontal plane is tested compared to the experimental data by the current scheme of the ISPH method. This test gives confidence in the adopted ISPH method. The simulations revealed that the porosity parameter plays a significant role in shrinking the wavefront of dam break over slopes. Once the fluid flow reaches a porous structure at approximately \(t = 0.25\) sec, the maximum velocity of the fluid decreases from \(555\) m/s to \(30\) m/s by \(t = 4.0\) sec. Physically, the reduction in porosity parameter enhances the porous resistance which slows down the free surface flow in the porous structures.