Earthquakes, as natural phenomena, have consistently caused damage and loss of human life throughout history. Earthquake prediction is an essential aspect of any society’s plans and can increase public preparedness and reduce damage to a great extent. Despite advances in computing systems and deep learning methods, no substantial achievements have been made in earthquake prediction. One of the most important reasons is that the earthquake’s nonlinear and chaotic behavior makes it hard to train the deep learning method. To tackle this drawback, this study tries to take an effective step in improving the performance of prediction results by employing a novel method in earthquake prediction. This method employs a deep learning model based on convolutional neural networks (CNN), bi-directional long short-term memory (BiLSTM), and an attention mechanism, as well as a zero-order hold (ZOH) pre-processing methodology. This study aims to predict the maximum magnitude and number of earthquakes in the next month with the least error. The proposed method was evaluated by an earthquake dataset from nine distinct regions of China. The results reveal that the proposed method