Traditional Chinese Medicine fumigation is a traditional treatment and the composition of the air is changed to achieve therapeutic effect. In this study, a new experimental system based on laser‐induced breakdown spectroscopy (LIBS) is developed to online in situ detect the smoke and monitor the influence on air composition by smoke. Atractylodis rhizome, wormwood, and perilla are chosen as samples to test the feasibility and accuracy of this system. Some characteristic lines can be seen in the spectra, and detailed elemental information is obtained. The spectra of three types of smoke were analyzed via an identification system based on principal component analysis, random forest (RF), and support vector machine (SVM). The contribution rate of the first two major components is 81.6% in total. The accuracy of classification by RF reaches 87.5% and SVM realizes a classification accuracy of 91.7%. The innovative and developed system based on LIBS and machine learning is demonstrated having a promising application in online in situ detection of air components and classification of smoke generated by Chinese medicine fumigation.