To implement the discovery of discarded anti-corrosion wood, an automatic sorting robot system was built. Three kinds of commonly used wood were selected as the research object, which uses hyperspectral imaging technology to achieve the identification. In the range of 900–1700 nm (230 bands), the infrared spectra of three kinds of anti-corrosion wood were collected, and then the characteristic information was obtained through the analysis of MATLAB to distinguish them. Among them, three kinds of preservative woods are Scots pine (add CCA treatment), Pseudotsuga menziesii (high-temperature carbonization treatment) and Incense Cedar (pressurized treatment). After the pretreatment by the Savitzky-Golay method, spectral data were conducted by principal component analysis (PCA), and the contribution rate of the first three principal components reached 99.902 %. Besides, through the loading coefficients of the first three principal components that were plotted on the wavelength, we obtained five characteristic wavelengths and corresponding reflectance information, simultaneously; this set up a typical discriminant analysis model. Then, the model was validated by the validation set, and the accuracy rate of the prediction set was 98.89 %. This method can effectively identify and classify three kinds of anti-corrosion wood, which can provide a scientific method and basis for a solid waste sorting system.