About 50% of dam failures in the world have been triggered by piping, which is a primary cause of embankment breaks. The phenomenon of piping results from the erosion of soil particles and their transport within the soil mass. In this paper, a numerical method to analyze erosion within soils and transport of eroded soil particles is proposed. For the analysis, the saturated-unsaturated seepage flow of the pore liquid, the detachment of soil particles from the soil fabric and the migration of the eroded particles are needed to be considered. As the results of this numerical simulation, the temporal alteration and the spatial distribution of the porosity, the particle size distribution and the concentration of the detached soil particle in the pore liquid, as well as the pore liquid pressure, can be obtained. The results of this analysis have revealed that the method qualitatively predicts the development of piping inside soil structures, such as embankments, as the solutions of the initial and boundary value problem.