Objective. Rubi Fructus (RF) is a dry aggregate fruit of Rubus (Rosaceae). It has shown significant pharmacological effects such as anti-oxidation, hypoglycemic, and anti-inflammatory. A combination of near-infrared (NIR) spectroscopy and partial least squares regression (PLSR) under seven different spectral data preprocessing techniques was used to determine the performance of quantitative analysis correction models which employed moisure, ellagic acid, and total flavonoids as indicators of RF. Methods. Ninety-seven different RF batches were collected for NIR spectra. By using primary analysis techniques such as drying method, high-performance liquid chromatography (HPLC), and ultraviolet visible spectrophotometry (UV-Vis), the contents of moisure, ellagic acid, and total flavonoids were determined. The NIR spectral data and the primary analysis method data were correlated through PLSR. Seven methods were used for pretreating the spectral data, including no spectral pretreatment, first derivative, standard normalized variate, multiple scattering corrections, elimination of constant offset, and minimum maximum normalization. The quantitative analysis correction models adopted PLSR chemometrics for moisture, ellagic acid and total flavonoids were developed, and their effectiveness was evaluated using the correlation coefficient (R), ratio of prediction to deviation (RPD), and root mean square error (RMSE). Results. The first derivative was combined with variable standardization, elimination of constant offset, and multiple scattering corrections, respectively, to pretreat the PLSR models for moisture, ellagic acid, and total flavonoids. The R-values of the PLSR models for moisture, ellagic acid, and total flavonoids were, respectively, 0.9788, 0.9468, and 0.9748, all of which were higher than 0.90, and the RPD values were 4.9, 3.1, and 4.5, respectively, which were all larger than 3.0. The RMSE ratios of the calibration set and the test set were 0.98, 0.94, and 1.0, respectively. Conclusion. The R-values of the NIR-PLSR models for moisture, ellagic acid, and total flavonoids are all greater than 0.90 after suitable pretreatments, indicating that the models are reliable. The RPD values are more than 3.0, which indicate that the models are good and useable for quality control. The RMSE ratios are closed to 1, indicating that the calibration set and test set had same distribution and the models were not overfitting indicating good predictability.