Nondestructive and accurate estimation of walnut kernel protein content is important for food quality grading and profitability improvement of walnut packinghouses. Hyperspectral image technology provides potential solutions for walnuts nutrients detection by obtaining both spectral and textural information. However, the redundancy and large computation of spectral data prevent the widespread application of hyperspectral technology for high throughput evaluation. For walnut kernel protein inversion from hyperspectral image, this study proposed a novel feature selection method, which is named as improved whale optimized algorithm (IWOA). In the IWOA, a comprehensive feature selection criterion was applied in the iterative process, which fully considered the relevance of spectra information with target variables, representative ability of the selected wavebands to entire spectra, and redundancy of the selected wavebands. Especially in the relevance with target variables, the amplitude and shape characteristics of the spectra were both taken into consideration. Eight wavelengths around 996, 1225, 1232, 1377, 1552, 1600, 1691 and 1700 nm were then selected as the sensitive wavelengths to walnut protein. These wavelengths showed good correlation with certain chemical compounds related to protein contents mechanistically. Then three protein prediction models were established. After analysis and comparison, the model based on the selected wavelengths got better results with the one based on the full spectrum. Compared to the models based on solely spectral information, the model that combine spectral and textural information outperformed and got the best prediction results. The R 2 in the calibration group was 0.9047, and the root mean square errors (RMSE) was 11.1382 g/kg. In the validation group, the R 2 was 0.8537, and the RMSE was 18.9288 g/kg. The results demonstrated that the combination of the selected wavelengths through the IWOA with the textural characteristics could effectively estimate walnut protein contents. And the proposed method can be extended to the detection and inversion of other nutritional variables of nuts.