The present study aims to predict the oil quantity in % using Near-infrared spectroscopy (NIRS) directly from spectral data acquired on rapeseeds (Brassica napus). In total 637 samples were used to construct and test the mathematic model. The correlation coefficient (R2) between the NIRS predicated results and the chemical extraction method was .98, .97, and .96 for the calibration, cross validation, and external validation, respectively. For external validation, the average relative error and the mean absolute error was 0.78 and 2.02%, respectively, compatible with those of chemical extraction method. Further determination suggested that 1.5 g was the minimal quantity of sample loading to obtain stable results and the NIRS method showed a similar repeatability to the chemical extraction method. Taken together, NIRS method enables the rapid detection of oil quantity of intact B. napus seeds. Practical applications The present study constructed a mathematic model for the measurement of oil content of rapeseed using the NIRS technology. Compared with the traditional method for oil content determination using the chemical extraction, the NIRS method is cheaper, safer, more rapid, and convenient. It shows similar repeatability to the chemical extraction method and needs not to destroy the samples. Thus, the method raised in the present study could be used to detect the oil content of intact rapeseeds in food and breeding industries.