The influence of earthquake disasters on human social life is positively related to the magnitude and intensity of the earthquake, and effectively avoiding casualties and property losses can be attributed to the accurate prediction of earthquakes. In this study, an electromagnetic sensor is investigated to assess earthquakes in advance by collecting earthquake signals. At present, the mainstream earthquake magnitude prediction comprises two methods. On the one hand, most geophysicists or data analysis experts extract a series of basic features from earthquake precursor signals for seismic classification. On the other hand, the obtained data related to earth activities by seismograph or space satellite are directly used in classification networks. This article proposes a CNN and designs a 3D feature-map which can be used to solve the problem of earthquake magnitude classification by combining the advantages of shallow features and high-dimensional information. In addition, noise simulation technology and SMOTE oversampling technology are applied to overcome the problem of seismic data imbalance. The signals collected by electromagnetic sensors are used to evaluate the method proposed in this article. The results show that the method proposed in this paper can classify earthquake magnitudes well.