This study sought to develop a hyperspectral imaging (HSI)- and machine learning (mL)-based method to quantitatively analyze the composition of alcohols and esters of Soy Sauce-Aroma Type Baijiu (SSAB). First, preprocessed the spectral data in the 900–1700 nm NIR range using various algorithms. Then, particle swarm optimization-support vector regression (PSO-SVR) and random forest (RF) models were established based on the full wavelength and the feature wavelength spectral data. In the preprocessing method, the external parameter orthogonalization (EPO) method demonstrated superior modeling performance in most cases. Spearman correlation analysis revealed a significant positive correlation between the concentrations of ethanol and alcohols in the SSAB samples, with an r-value of 0.93. Ethyl acetate and ethyl lactate also showed a significant positive correlation with esters, with r-values of 0.87 and 0.88, respectively. Combining the relevant compounds with feature wavelengths as input yields a model with high accuracy, with an Rp2 of 0.997 and RMSEP of 0.118 mg/L for alcohols and an Rp2 of 0.996 and RMSEP of 0.017 mg/L for esters. The results indicate that HSI can achieve non-destructive and accurate detection of alcohols and esters in the aroma of SSAB, providing a new method for aroma analysis in Baijiu.