The stability and robustness of determining earthquake magnitude are of great significance in earthquake monitoring and seismic hazard assessment. The routine workflow of determining earthquake local magnitude, such as the widely used Richter magnitude, may result in an unreliable measurement of earthquake magnitude because it relies on individual amplitude measurement of a single station, which is prone to be influenced by natural impulsive noise or anthropogenic noise. In this study, we present an automated estimation of earthquake magnitude by applying a deep‐learning algorithm named magnitude neural network (MagNet) based on the full‐waveform recordings from a network of seismic stations at China seismic experimental site (CSES). The MagNet consists of a compression component that extracts the global features of waveform data and an expansion component that yields a Gaussian probability distribution representing the magnitude estimation. The MagNet is trained with an augmented data set, which includes 21,700 training samples with evenly distributed magnitudes. From the prediction results on the test data set, the mean errors and standard deviations are −0.017 and 0.21, respectively, for 600 moderate earthquakes with magnitudes ranging from 3 to 5.9, and −0.011 and 0.14, respectively, for 70 small earthquakes with magnitudes ranging from 2.3 to 3.5. However, it remains challenging for large earthquakes (), due to the lack of sufficient historical large earthquakes as training data. In addition, testing results show that the new method is capable of minimizing the impact of abnormal noises in the data. These results demonstrate the validity and merits of the proposed deep‐learning method in predicting earthquake magnitude automatically.