A novel method combining a discrete particle swarm optimization (DPSO) with a support vector machine (SVM) was proposed for the variable interval selection of tissue sections of endometrial carcinoma by near infrared spectroscopy. The DPSO-SVM algorithm includes a multi-stage screening. In each screening step, the DPSO was repeated 50 times using random sampling, and the frequencies that the variable intervals were selected among the 50 repeats were used to select the most probable intervals. The variable intervals with high probabilities were selected and further used in the next screening. Finally, the subset of variable intervals with the highest classification rate was considered as the optimal variable intervals. A synthetic data set mimicking the near infrared (NIR) spectra of tissue samples was applied to evaluate the performance of the DPSO-SVM. For the synthetic data, the classification rates were 74.9 ± 0.9% and 100% for the full spectral range and the six variable intervals selected by the DPSO-SVM. For the real endometrial tissue data, the entire spectral data gave an average accuracy of 69.5 ± 0.5%, while the 20 variable intervals gave 98.5 ± 0.3%. The results showed that the informative variables from the NIR spectra could be selected and high classification accuracy was achieved by the proposed approach.