Plant dye is a promising dyestuff to be used in textiles due to its unique environmental compatibility. However, currently there is no effective method for the identification of plant-dyed and chemical-dyed textiles. In this study, near-infrared (NIR) spectroscopy combined with three kinds of pattern recognition methods, namely soft independent modeling of class analogy (SIMCA), partial least squares (PLS) regression and principal component regression (PCR), were applied to identify cotton fabrics dyed with plant and chemical dyes. A total of 336 plant dye and chemical dye dyed cotton fabrics were prepared and the NIR spectra were collected; 267 samples were used as the calibration set, while the remaining 69 samples were used as the validation set. After pretreatment with the Savitzky–Golay first derivative, the calibration model was constructed. In the SIMCA model, the correct recognition rate values of the calibration and prediction sets were 100% and 98.55%, respectively. The PLS model showed that the number of principal components (PCs) and the correlation coefficient ( R2) were 8 and 0.9978, respectively, and the results of PCR were PC = 10, R2 = 0.9937. Both methods were satisfactory for the predicted results. The overall results indicated that NIR spectroscopy could be used for rapid and nondestructive identification of plant-dyed cotton fabrics and chemical-dyed cotton fabrics.