The earthquake magnitude prediction is a task of utmost difficulty that has been addressed by using many different strategies, with no further transformation thus far. This work evaluates the Haskell based deterministic dendritic cell algorithm (hDCA)’s accuracy when used to predict earthquake magnitude in Sichuan and surroundings. First, eight seismicity indicators have been retrieved from the literature and used as input for the algorithms, and they are calculated from the earthquake catalog of the Sichuan and surroundings by well-known geophysical theory, named Gutenberg-Richter inverse power-law, and characteristic earthquake magnitude distribution and also conclusions drawn by recent related studies. Then, the hDCA is used to predict earthquakes with magnitude larger than 4.5 in the next month. In this work, the proposed method has been compared to the well-known machine learning algorithms, such as Dendritic Cell Algorithm (DCA), Support Vector Machine (SVM), K-Nearest Neighbor (KNN), Back Propagation Neural Network (BPNN), Recurrent Neural Network (RNN), Probabilistic Neural Network (PNN) and Neural Dynamic Classification (NDC). Overall our method yields the promising results in terms of all qualify parameters evaluated.