Soil classification stands as a pivotal aspect in the domain of agricultural practices and environmental research, wielding substantial influence over decisions related to real-time soil management and precision agriculture. Nevertheless, traditional methods of assessing soil conditions, primarily grounded in labor-intensive chemical analyses, confront formidable challenges marked by substantial resource demands and spatial coverage limitations. This study introduced a machine olfaction methodology crafted to emulate the capabilities of the human olfactory system, providing a cost-effective alternative. In the initial phase, volatile gases produced during soil pyrolysis were propelled into a sensor array comprising 10 distinct gas sensors to monitor changes in gas concentration. Following the transmission of response data, nine eigenvalues were derived from the response curve of each sensor. Given the disparate sample counts for the two distinct classification criteria, this computational procedure yields two distinct eigenspaces, characterized by dimensions of 112 or 114 soil samples, each multiplied by 10 sensors and nine eigenvalues. The determination of the optimal feature space was guided by the “overall feature information” derived from mutual information. Ultimately, the inclusion of random forest (RF), multi-layer perceptron (MLP), and multi-layer perceptron combined with random forest (MLP-RF) models was employed to classify soils under four treatments (tillage and straw management) and three fertility grades. The assessment of model performance involved metrics such as overall accuracy (OA) and the Kappa coefficient. The findings revealed that the optimal classification model, MLP-RF, achieved impeccable performance with an OA of 100.00% in classifying soils under both criteria, which showed almost perfect agreement with the actual results. The approach proposed in this study provided near-real-time data on the condition of the soil and opened up new possibilities for advancing precision agriculture management.