The object of this study was to establish a new method to predict the content of DE and ME in sorghum fed to growing pigs by using near-infrared reflectance spectroscopy (NIRS). A total of 33 sorghum samples from all over China were used in this study. The samples were scanned for their spectra in the range of 12,000 to 4,000 cm-1. Based on principal components analysis of the spectra, the samples were split into a calibration set (n = 24) and a validation set (n = 9) according to the ratio of 3:1. With animal experiment values as calibration reference, the calibration models of DE and ME were established using partial least squares regression algorithm. Different spectral pretreatments were applied on the spectra to reduce the noise level. The best wavenumber ranges were also investigated. Results showed that DE and ME content in sorghum fed to growing pigs ranged from 14.57 to 16.70 MJ/kg DM and 14.31 to 16.35 MJ/kg DM, respectively. The optimal spectral preprocessing method for DE and ME was the combination of first derivative and multiplicative scatter correction. The most informative near-infrared spectral regions were 9,403.9 to 6,094.4 cm-1 and 4,605.5 to 4,242.9 cm-1 for both DE and ME. The best performance for DE and ME calibration models was the coefficient of determination of calibration (R2c) of 0.94 and 0.93, coefficient of determination of cross-external validation (R2cv) of 0.88 and 0.86, residual predictive deviation of cross-external validation (RPDcv) of 2.86 and 2.64, coefficient of determination of external validation (R2v) of 0.90 and 0.81, and residual predictive deviation of external validation (RPDv) of 3.15 and 2.35, respectively. There were no significant differences between the measured and NIRS predicted values for DE and ME (P = 0.895 for DE and P = 0.644 for ME). As the number of calibration samples increased from 24 to 33, the calibration performance of DE and ME models was improved, indicated by increased R2c, R2cv, and RPDcv values. In conclusion, NIRS quantitative models of the available energy in sorghum were established in this study. The results demonstrated that the content of DE and ME in sorghum could be predicted with relatively high accuracy based on NIRS and NIRS showed the superiority of speediness and practicality when compared with previous research methods including animal experiments, regression equations, and computer-controlled simulated digestion system.