Due to the different generation and propagation mechanisms of P- and S-waves, there may be significant differences in the seismic data collected by the two, which poses a great obstacle to the time domain matching of P- and S-waves in multiwave exploration. Furthermore, the quality and accuracy of the matching effect will directly affect the subsequent multiwave joint inversion and interpretation effect. Therefore, the study of P and S-wave-matching methods plays a crucial role in seismic exploration. In 2013, Hale improved the classical Dynamic Time Warping (DTW) algorithm applied to solve the problem of speech recognition, and obtained the DTW algorithm suitable for solving the matching of P-waves and S-waves. The seismic wave-matching results generated by this algorithm are horizontal discontinuous (different trajectories) and need further processing. This study analyses the algorithm based on simulations of seismic waves using Ricker wavelets. In response to existing problems, this paper proposes strategies to improve the DTW algorithm. The algorithm in this study significantly improved the continuity of the registration results of the actual seismic wave data in the horizontal direction (different traces).