Earthquakes are a very catastrophic natural event that occurs due to sudden changes in the earth’s crust, leading to human, financial, and environmental losses in society. Therefore, employing an efficient and dependable method for earthquake prediction can significantly reduce casualties. In this regard, we proposed a deep neural network called the hybrid convolutional neural network and bi-directional long-short-term memory (HC-BiLSTM) to predict the mean magnitude of the future earthquake in a specific area of Japan. To achieve this goal, we suggest a strategy based on four key steps: the division of areas, the preprocessing, the spatial and temporal feature learning, and the prediction. In the division of areas step, The part of Japan is divided into 49 smaller areas to better predict the next earthquake’s location. The preprocessing step uses the zero-order hold method in the time series of the mean magnitude of the earthquake. In the next step, the learning spatial and temporal characteristics between earthquake data include three layers of CNN and pooling and two layers of LSTM. Finally, the prediction step has two fully connected layers that combine information supplied by HC-BiLSTMs to predict the mean magnitude for the earthquake next month. As a result, using a comparative method, this study demonstrates the superiority of the proposed method over other common earthquake prediction methods.