In order to explore the content of element method for rapid detection of straw biomass, this paper has used the hyperspectral imaging technology, combined with a variety of methods for data optimization, to study the feasibility of fast detection on elements of N, C, H, S and O of straw biomass. Sample selection includes four categories (rice, wheat, canola and corn) totaling 188 straw samples. The research collects reflection hyperspectral images, according to the America Society for testing and materials (ASTM) standard, measuring the elemental content in samples with the EA3000 element analyzer, using respectively spectral and image dimension analysis method, combined with partial least squares (PLS), constructed the basic elements of quantitative analysis model of biomass straw. The research collects reflection hyperspectral images, extracts the spectral-dimensional data, then uses different spectra pretreatment methods on the full spectral pretreatment, builds up the quantitative analytic model of straw elements. The model shows that the quantitative analytic model of N and O is better than the other elements, the relative error analysis of N element is 0.901 and the root mean square error is 0.217%, the validated correlation coefficient of O element is 0.856 and the RMSEP is 1.105%, so the models can well realize the detection and analysis of the 2 elements. The results of C, H, S elements is slightly worse, but the validated correlation coefficient still reached more than 0.65, it shows that although the detection model is unable to realize the detection of 3 kinds of elements, but by way of optimization the model may use for quantitative analysis. As the full spectral data is so large, not only introduce the variables without elemental analysis, but also restricts the speed of detection, so use competitive adaptive reweighted sampling algorithm (CARS) to select sensitive variables for element detection, extracts the spectral-dimensional data. The optimal quantitative analysis model based on the spectral dimension data has been established combined with PLS stoichiometry algorithm. The 24 variables have been used to build the model of N element, the correlation coefficient is 0.923, the root mean square error (RMSEP) is 0.196%, the relative error analysis (RPD) is 3.11;The 10 variables have been used to build the model of N element, the validated correlation coefficient is 0.876, the RMSEP is 1.015%, the RPD is 2.32, the models of N and O element can be used for practical application;validated correlation coefficients of C, H, S elements are less than 0.80, which cannot be the actual application analysis. Use the independent component analysis algorithm (ICA) to analyze the image dimension of original hyperspectral data and extract the images of IC1-IC5. The features (572.09, 643.69, 685.14, 766.79, 819.55, 964.01 nm) have been obtained according to the weight coefficients graph of each band, use the 6 characteristic spectral variables to build the PLS quantitative analysis model for elements of straw, N, C, H, S and O elements cannot be the actual application analysis. The results show that: the model based on the spectral dimension data combined with CARS-PLS is better than the model based on the image dimension data on the whole. The detection models of N and O elements based on the spectral dimension data are superior to the other elements;the 2 models could respectively achieve the quantitative analysis for N and O elements. This research indicates that use of the hyperspectral imaging technology and the application of its spectral dimension data combined with CARS-PLS could achieve an effective detection for N and O elements of straw biomass.