A new rapid chemometric method has been developed to identify the anterior and posterior roots of cauda equina nerves by near-infrared (NIR) diffuse reflectance spectroscopy. NIR spectra of nerves were measured using a Fourier transform NIR spectrometer equipped with a fiber-optic probe. The result revealed no observable difference in the spectra between the anterior and posterior root samples, but the two roots could be identified by cluster analysis based on the differences of their spectral features. The overall accuracy of the cluster analysis model was 87.5%, and the accuracy for the actual anterior root and actual posterior root were 95% and 80%, respectively. The result suggested that NIR spectroscopy in combination with the chemometrics method (cluster analysis) could be used to classify the anterior and posterior roots of cauda equina nerves. The proposed method required only a few minutes, while classical methods commonly required at least one hour. It was demonstrated that the new method could provide a rapid, correct, nondestructive and low-cost potential means to quickly differentiate anterior and posterior roots in mixed cauda equina nerves, which would be helpful for surgeons to align nerve stumps correctly.