The evaluation of mutton adulteration faces new challenges because of mutton flavour essence, which achieves a similar flavour between the adulterant and mutton. Hence, methods for classifying and quantifying the adulterated mutton under the effect of mutton flavour essence, based on near-infrared hyperspectral imaging (NIR-HSI, 1000–2500 nm) combined with machine learning (ML) and sparrow search algorithm (SSA), were proposed in this study. After spectral preprocessing via first derivative combined with multiple scattering correction (1D + MSC), classification and quantification models were established using back propagation neural network (BP), extreme learning machine (ELM) and support vector machine/regression (SVM/SVR). SSA was further used to explore the global optimal parameters of these models. Results showed that the performance of models improves after optimisation via the SSA. SSA-SVM achieved the optimal discrimination result, with an accuracy of 99.79% in the prediction set; SSA-SVR achieved the optimal prediction result, with an RP2 of 0.9304 and an RMSEP of 0.0458 g·g−1. Hence, NIR-HSI combined with ML and SSA is feasible for classification and quantification of mutton adulteration under the effect of mutton flavour essence. This study can provide a theoretical and practical reference for the evaluation and supervision of food quality under complex conditions.