To crack down on criminals using the delivery channel to transport weight-loss drugs doped with toxic and harmful nonfood raw materials, a pattern recognition method of weight-loss drugs based on terahertz time-domain spectroscopy was proposed. Compared with traditional methods, terahertz spectrum had high signal-to-noise ratio in time-domain spectrum, which was fast, time-saving and lossless. In this study, seven kinds of weight-loss drugs were selected as experimental samples. The terahertz time-domain spectra of the samples were collected. Three characteristic frequency intervals of 0–0.19, 1.75–2.14 and 2.23–2.5 (THz) were found by automatic peak finder. The characteristic frequency intervals were processed by Hilbert transform, Butterworth low-pass filter, fast Fourier transform low-pass filter and the first-order derivatives after standard normal transform, the feature data was fused with the original spectra, and the original data and the data fused by the four methods were classified and recognized by particle swarm optimization least squares support vector machine and extreme learning machine model optimized by Cuckoo algorithm. The experimental results showed that the particle swarm optimization least squares support vector machine model had the best recognition effect on the spectral feature fusion data after Hilbert transform, and the accuracy can reach 100 %. It had a certain reference significance for the identification of weight-loss drugs in forensic science.