The phenomenon of impaired concentration is common among adolescents, but the existing systems for attention detection and training are equipped with simplistic functions. This study develops an attention detection and training system based on EEG signals for adolescents. In light of few classifications and low accuracy in attention detection, we divide attention into five categories and propose an attention detection method based on the random forest model for higher detection accuracy which arrives at 76.17%. With regard to the deficiencies in unsatisfied effect of attention training, we design three serious game training modes for adolescents in terms of sustained attention, selective attention, and focus attention for the first time using the EEG-based closed-loop biofeedback technology. Meanwhile, to verify the effectiveness of the attention training mode, we define four indicators to conduct experiments with the self-control method while excluding the influence of familiarity with the game on subjects.