Full waveform inversion (FWI) method is used to reveal the internal structure of underground mediums in geotechnical engineering. It comprehensively utilizes the amplitude, travel time, and phase of a wave field. It also offers the potential to produce better resolution of the target medium and feasibility for the detection of buried low-velocity layers. A new FWI method for elastic waves in stratified mediums is presented, which adopts a quasi-linear method coupled with a random search algorithm. The strength of this approach is that the Jaccobian matrix is iteratively calculated instead of the Hession matrix, and the inversion work is helpful for getting out of the local minima within appropriate search scope. To verify our method, it is applied to numerical 2-D stratified models and the appropriate search step and range constraint for inversion are determined by parameter sensitivity analysis. With a series of waveform pretreatments, including filter process, waveform energy normalization, and waveforms mitigation based on correlation analysis, we extended it to use with 3-D stratified media models. Its feasibility and accuracy in recovering the unknown parameters of low-velocity layers are certified. Based on the results of the numerical cases, this FWI method can be used for detecting the grouting quality in immersed tube tunnels. The S-wave velocity profiles of low-velocity layers under the tunnel floor are obtained. Because the S-wave velocities of grouting layers will increase before and after grouting, the grouting quality is effectively evaluated by the FWI method and provides a practical reference for other similar projects.