A novel method based on continuous wavelet transform (CWT) was proposed as a preprocessing tool forthe near-infrared (NIR) spectra. Due to the property of the vanishing moments of the wavelet, the fluctuatingbackground of the NIR spectra can be successfully removed through convolution of the spectra with anappropriate wavelet function. The vanishing moments of a wavelet and the scale parameter are two keyfactors that govern the result of the background elimination. The result of its application to both the simulatedspectra and the NIR spectra of tobacco samples demonstrates that CWT is a competitive tool for removingfluctuating background in spectra.