Butter yellow (BY; 3′-methyl-4-dimethyl-aminoazobenzene) is a carcinogenic adulterant of edible mustard oil. In this study, Fourier-transform near-infrared (FT-NIR) spectral data was combined with multivariate data analysis to both detect and quantify BY adulteration in mustard oil. Fifteen pure mustard oil and one hundred fifty mustard oil samples with BY (0.1–1% w/v) as the adulterant were evaluated. It was observed that sonication- based processing of adulterated samples provides sensitive fingerprints during FT-NIR analysis when compared to heat- based processing. Principal component analysis (PCA) of spectral regions 6000–6064 cm−1 showed well-defined discrimination of pure and adulterated mustard oil with 100% variability. For quantification of BY both NIPALS (non-linear iterative partial least squares) based partial least square (PLS) and LS-SVM (least squares support vector machine) were carried for full-spectrum as well as selected fingerprints using RCGA (real coded genetic algorithm), a variable selection method. Overall, RCGA-LS-SVM model showed best calibration and prediction model with high precision and accuracy based on low root mean square error of cross validation (RMSECV = 0.0073) and prediction (RMSEP = 0.0060). RCGA has indeed lowered the number of variables to mere 30 variables to predict BY in the range of (0.1–1% w/v) with a correlation coefficient of calibration (RC2 = 0.9997) and prediction (RP2 = 0.9996). The key fingerprints detect CH3 and CH functional groups (1st overtone) of BY. This study demonstrated that FT-NIR spectroscopy, combined with selected 30 variables using RCGA-PLS procedure could be a robust technique for the rapid quantification of butter yellow in mustard oil samples. The study would certainly help in quality control and quality assurance of mustard oil and could be emulated for other edible oils.