The unsaturated soil has the suction force on soil water, which seriously affects the engineering characteristics of the soil. In this paper, the mudstone of a high-speed railway foundation is taken as the research object, and the influence of water content and compaction on its suction is studied by the filter paper method. The results are as follows: the matrix suction and total suction are nonlinearly reduced as increasing soil water content, and the reduction process is divided into a sudden reduction phase, a gradual reduction phase and a suction stabilization phase. In the case of low water content, moisture migrates in a gaseous form, and the suction force measured by the contact filter paper is the total suction force. The equilibrium moisture content of the contact filter paper increases linearly with the increase of the soil moisture content. Dry density has a great influence on the total suction of soil samples at low level of saturation, the greater the dry density of the soil sample at the same saturation, the greater the suction of the matrix. In the single logarithmic coordinates, soil water characteristic curve is approximately in a “S” shape, and it can be well fitted by a typical soil-water characteristic(SWCC) model. The test results of this study can be used to predict and model the engineering properties of this kind of soils.