Detecting illegal drugs, such as cannabis and methamphetamine, with high accuracy and speed is a complex problem that requires an innovative solution. To address this challenge, we propose a new method that utilizes a newly developed electronic nose (e-nose) system with an unprecedented total of 56 sensors, including four different types: metal-oxide-semiconductor (MOS), electrochemical (EC), non-dispersive infrared (NDIR), and photoionization detector (PID). Previous studies on gas sensors have typically validated results in a single controlled laboratory condition. In contrast, our study evaluated the performance of our system in different environments from the original training setting. To evaluate the detection performance of our system in unfamiliar environments and its robustness, we diluted the drug gas with normal air from six different laboratory environments. In addition, we evaluated the detection accuracy of our method using forward-feature selection, which allowed us to evaluate the impact of different combinations of sensors. By selectively optimizing sensors based on their ability to capture unique features of different drugs, our proposed method reduced the number of optimal sensors to less than half of 56 (24 selected). The proposed method achieved a detection accuracy of 93.03% and reduced the error rate from 12.23% to 6.97% using 5166 datasets including cannabis, methamphetamine, and tobacco. Our research not only provides rapid and enhanced accuracy, but also has the potential to be an effective tool for detecting illegal drugs in various settings, which could greatly contribute to strengthening national and social security.