In this paper, a deep learning-based method for earthquake prediction is proposed. Large-magnitude earthquakes and tsunamis triggered by earthquakes can kill thousands of people and cause millions of dollars worth of economic losses. The accurate prediction of large-magnitude earthquakes is a worldwide problem. In recent years, deep learning technology that can automatically extract features from mass data has been applied in image recognition, natural language processing, object recognition, etc., with great success. We explore to apply deep learning technology to earthquake prediction. We propose a deep learning method for continuous earthquake prediction using historical seismic events. First, we project the historical seismic events onto a topographic map. Taking Taiwan as an example, we generate the images of the dataset for deep learning and mark a label "1" or "0", depending on whether in the upcoming 30 days a greater than M6 earthquake will occur. Second, we train our deep leaning network model, using the images of the dataset. Finally, we make earthquake predictions, using the trained network model. The result shows that we can get the best result, when we predict earthquakes in the upcoming 30 days using data from the past 120 days. Here, we use R score as the performance metrics. The best R score is 0.303. Although the R score is not high enough, using the past 120 days' historic seismic event to predict the upcoming 30 days' biggest earthquake magnitude can be seen as the pattern of Taiwan earthquake because the R score is rather good compared to other datasets. The proposed method performs well without manually designing feature vectors, as in the traditional neural network method. This method can be applied to earthquake prediction in other seismic zones.