Geotechnical materials are products of the nature, and their properties have great spatial variability. Based on the existing research results of soil random field simulation methods, considering the variability coefficients of soil strength parameters and correlation distance, the influences of soil spatial variability on the vertical bearing capacity of the pile foundation under vertical loading is investigated by the numerical method. The analysis results show that the median value of the bearing capacity of the pile foundation is smaller than that obtained by deterministic analysis, considering the spatial variability of soil. With the increase of coefficient of variation and the correlation distance, the uncertainty of the bearing capacity of the pile foundation becomes more and more. It is necessary to pay attention to the large variability of the soil parameters in practical engineering. The distribution law of the vertical bearing capacity of the pile foundation considering the spatial variability of soil strength parameters can be described by lognormal distribution curves. When the number of samples is enough, the totality can be inferred from the samples, and the failure probability of the pile foundation under any load can be obtained accordingly.