Automatic S-wave arrival time estimation is, due to the complex characteristic of most of the S onsets, a topic of ongoing research. Manual as well as automated S-wave picking is more difficult than P-wave picking, as S wave is usually buried in the preceding P-coda. In addition, S-wave splitting, due to possible seismic anisotropy, and the presence of Sp-converted precursors, due to shallow strong velocity discontinuities, increase the complexity of S-wave onset time picking. The goal of this study is to develop an automatic S-wave onset time picking algorithm, using undecimated discrete wavelet transform (UDWT) and autoregressive (AR) model. The novelty of this research is the application of UDWT to define a characteristic function based on the seismogram envelope that leads to accurate S-wave detection. First, an initial arrival time is estimated using the signal envelope. Then S-wave onset is improved with an AR model regarding the fact that a short time after S waves arrival the amplitude is maximized. The robustness of the proposed method under different SNR’s has been tested on synthetic seismograms, contaminated with noise. It has also been applied to 180 local and regional events with magnitude greater than 4 and epicentral distance from 100 to 1000 km, recorded by the permanent seismic networks within Iran. We also applied our method to a data set from Japan; the data set contains 30 events with a magnitude range greater than 3. The results of our proposed algorithm are compared with a traditional reference method, novel deep learning methods and manually picked phases. The tested data set contains 1160 manual picks from Iran earthquakes data set and 518 manual picks from Japan earthquakes data set. The results show that the proposed method appears to be promising to replace manual phase picking. The automatic picking algorithm described in this study is applicable in many seismological studies that require S onset detection and picking.