The contents of amylopectin and amylose are important indicators to evaluate the quality of sorghum. Hyperspectral imaging (HSI) is a technology based on machine vision and spectroscopy that has been widely used in the quality evaluation of various foods. Three combined algorithms were used to extract the characteristic wavelengths. The gray-level co-occurrence matrix (GLCM) was used to extract the textural features. Based on the spectra, textures, and fusion data, genetic algorithm-optimized back propagation neural network (BPNN-GA), cascade forest (CF), and partial least square regression (PLSR) models were established to predict the amylopectin and amylose contents. The BPNN-GA and CF models established using the characteristic wavelengths of visible-light were determined to be the best model, with RPD values of 8.2352 and 26.7308, respectively. These results demonstrated that HSI combined with machine learning algorithms could be used to enable the rapid and nondestructive prediction of amylopectin and amylose contents in sorghum.