In order to identify the moldy tea leaves in a fast and nondestructive way, a method involving wavelet coupled with k-nearest neighbor (WKNN) was proposed to select effective characteristic wavelengths in this paper. The hyperspectral imaging of 300 dried tea samples with 3 different mildew degrees (contrast check, mild moldy and severe moldy) were obtained using hyperspectral data acquisition device. Besides, food microbiological examination results showed that mold count and total numbers of colony increased with the increase of storage time, temperature and humidity. Roughness penalty smoothing (RPS) algorithm was used to preprocess the raw spectra. Afterwards, WKNN was applied to select the optimal wavelengths of spectral data by using db4, db6, sym5, sym7 as wavelet basis functions, respectively. In addition, five layers of wavelet decomposition were adopted based on different wavelet basis functions. Linear discriminant analysis (LDA) algorithm was used to build the classification models based on preprocessed spectra feature in characteristic wavelengths. The results showed that four optimal prediction models were optimal decomposition level in each wavelet basis function. In addition, the best performance model among all LDA models achieved an identification rate of 100% in the calibration set and 98.33% in the prediction set, in which db4 was used as wavelet basis function and the optimal wavelet decomposition level was 2. WKNN algorithm can effectively achieve the best wavelet decomposition layer and the best wavelengths. WKNN algorithm combined with NIR hyperspectral imaging technology can realize the effective wavelength extraction and classification of dried tea with different mildew degrees.