The ground vibration caused by the operation of high-speed trains has become a key challenge in the development of high-speed railways. In order to study the train-induced ground vibration affected by geotechnical heterogeneity, an efficient frequency–wave-number method coupled with the random variable theory model is proposed to quickly obtain the numerical results without losing accuracy. The track is regarded as a composite Euler–Bernoulli beam resting on the layered ground, and the spatial heterogeneity of the ground soil is considered. The ground dynamic characteristics of an elastic, layered, non-uniform foundation are investigated, and numerical results at three typical train speeds are reported based on the developed Fortran computer programs. The results show that as the soil homogeneity coefficient increases, the peak acceleration continuously decreases in the transonic case, while it gradually increases in the supersonic case, and the ground acceleration spectrum at a far distance obviously decreases; the maximum acceleration occurs at the track edge, and a local rebound in vibration attenuation occurs in the supersonic case.