The prediction of classroom PM2.5 concentration has practical importance for the management of classroom environment. Most of the existing researches focus on the prediction of indoor carbon dioxide and temperature, and lack of indoor PM2.5 prediction research, especially the long-term predictions in ten minutes or even thirty minutes, which could be more helpful in the practical situations. In this paper, an improved hybrid method, called SA-EMD-LSTM, is proposed to solve the challenge of long-term prediction, which employs the state-ofthe-art techniques from machine learning, including self-attention (SA) mechanism, empirical mode decomposition (EMD) algorithm, and long-short term memory (LSTM) network. In this method, firstly, the original PM2.5 sequence is decomposed into several subsequences by the EMD algorithm, which aims to resolve the complex problem into simplified sub-problems. Then, the subsequences are reconstructed with an improved SA mechanism, which aims to figure out the relationship between subsequences. Finally, the reconstructed sequence group is used as the input to the LSTM model, and returns the prediction results for the overall problem. The experimental results show that for prediction in 5-30 min, the R2 of our method reaches 99.63%-95.96%, and the mean absolute error is 1.91 & mu;g/m3-6.31 & mu;g/m3. Compared with the existing methods, our method performs best and improves the prediction accuracy by 46%-28%. And the introduction of SA mechanism reduces the complexity of the problem, saves 83% of running time and 62% of memory consumption.