Based on the PFC3D software, a one-dimensional foam mudstone seepage model was established, and the fluid-solid coupling simulation was carried out. The dynamic adjustment of bubble particle size was realized through the FISH function. In addition, a continuous grouting algorithm was developed, and the uniformity and continuity of mudstone distribution were verified. The seepage process of foam mudstone in soil layers was successfully simulated. Regarding the problem that the formation time of mud film is difficult to determine, three types of calculation termination conditions were proposed. By comparing the results of indoor experiments and numerical simulations, the rationality of the model was verified.