Functional near-infrared spectroscopy (fNIRS) is a powerful tool for monitoring brain functional activities. Due to its non-invasive and non-restraining nature, fNIRS has found broad applications in brain functional studies. However, for fNIRS to work well, it is important to reduce its sensitivity to motion artifacts. We propose a new wavelet-based method for removing motion artifacts from fNIRS signals. The method relies on differences between artifacts and fNIRS signal in terms of duration and amplitude and is specifically designed for spike artifacts. We assume a gaussian distribution for the wavelet coefficients corresponding to the underlying hemodynamic signal in detail levels and identify the artifact coefficients using this distribution. An input parameter controls the intensity of artifact attenuation in trade-off with the level of distortion introduced in the signal. The method only modifies wavelet coefficients in levels adaptively selected based on the degree of contamination with motion artifact. To demonstrate the feasibility of the method, we tested it on experimental fNIRS data collected from three infant subjects. Normalized mean-square error and artifact energy attenuation were used as criteria for performance evaluation. The results show 18.29 and 16.42 dB attenuation in motion artifacts energy for 700 and 830 nm wavelength signals in a total of 29 motion events with no more than -16.7 dB distortion in terms of normalized mean-square error in the artifact-free regions of the signal.