Constructing an efficient and accurate epilepsy detection system is an urgent research task. In this paper, we developed an EEG-based multi-frequency multilayer brain network (MMBN) and an attentional mechanism based convolutional neural network (AM-CNN) model to study epilepsy detection. Specifically, based on the multi-frequency characteristics of the brain, we first use wavelet packet decomposition and reconstruction methods to divide the original EEG signals into eight frequency bands, and then construct MMBN through correlation analysis between brain regions, where each layer corresponds to a specific frequency band. The time, frequency and channel related information of EEG signals are mapped into the multilayer network topology. On this basis, a multi-branch AM-CNN model is designed, which completely matches the multilayer structure of the proposed brain network. The experimental results on public CHB-MIT datasets show that eight frequency bands divided in this work are all helpful for epilepsy detection, and the fusion of multi-frequency information can effectively decode the epileptic brain state, achieving accurate detection of epilepsy with an average accuracy of 99.75%, sensitivity of 99.43%, and specificity of 99.83%. All of these provide reliable technical solutions for EEG-based neurological disease detection, especially for epilepsy detection.