A novel method for discovery of adulteration in edible oil is proposed based on concept of refractive index and electronic sensors. The research work focusses on two distinct methodologies like employing datasets and implementing a fumigation technique that integrates real-time hardware for testing Edible oil Impurities. In the first method, the dataset taken into consideration contains spectral data collected using Advanced ATR-MIR Spectroscopy for pure oil and various levels of adulteration with Vegetable oil. Each and every edible oil has a certain value of refractive index. When such oils are contemned in a change adding adulterants, the value of its refractive indices also changes. This value of refractive index serves as a feature for testing the oil and helps us in detecting the adulteration. If Oil is adulterated with vegetable oils, the refractive index will be lower and with animal fats, the refractive index will be higher than that of pure Oil. While in Fumigation Method a hardware module is develop in which adulterated & pure oil samples are heated at 40–50 °C for 4.66 min and the volatiles that are generated by varying gas concentrations are forcefully passed through to the MEMS Gas Sensor-MISC-2714 and Multichannel Gas sensor. The conductance of the sensors changes according to the gases sensed by the sensors contributes to features extraction. The conductance value serves as a feature for the classifier to determine whether the sample is highly, moderately, or lowly contaminated. Thus, in proposed methods we use different algorithms based on machine learning like KNN, Random Forest, CATBOOST and XGBOOST to accurately reveal the adulteration. Amongst all the applied algorithm Random Forest (RF) Classifier & XGBOOST algorithm outperform well and gives 100% accuracy. The proposed work is used for identifying food adulteration in edible food products which helps us to feed Society with high-quality food.