Mass spectrometry (MS) data is susceptible to random noises and alternating baseline, posing great challenges to spectral peak detection, especially for weak peaks and overlapping peaks. Herein, an efficient peak detection algorithm combining continuous wavelet transform (CWT) and genetic algorithm-based threshold segmentation (denoted as WSTGA) for mass spectrometry was proposed. Firstly, Mexican Hat wavelet was selected as the mother wavelet by comparing the matching degree between the difference of Gaussian (DOG) and different wavelets. Subsequently, the ridges and valleys were identified from 2D wavelet coefficient matrix. Afterward, an improved threshold segmentation method, Otsu method based on genetic algorithm, was introduced to find optimal segmentation threshold and achieve better image segmentation, overcoming the deficiency of traditional Otsu method that cannot handle long-tailed unimodal histograms. Finally, the characteristic peaks were successfully identified by utilizing the ridge-valley lines in wavelet space and original spectrum. Receiver operating characteristic (ROC) curve, area under curve (AUC) and F₁ measure are used as criterions to evaluate performance of peak detection algorithms. Compared with multi-scale peak detection (MSPD) and CWT and image segmentation (CWT-IS) methods, all the results showed that WSTGA can achieve better peak detection. More importantly, the experimental results from MALDI-TOF spectra demonstrated that WSTGA can effectively detect more weak peaks and overlapping peaks while maintaining a lower false peak detection rate than MSPD and CWT-IS methods, indicating its great advantages in characteristic peak identification.