Metal hydride thermal/hydrogen energy storage material is considered ideal candidate due to high energy density,wide workingtemperature range and lack of corrosive pollutants. Multi-component metal hydride alloys can be formed by doping with differentelements to obtain various target properties. However, conventional material development method relies on experimental synthesis,having the disadvantages of time-consuming and costly. Data-driven machine learning prediction model is capable of addressing thisproblem. By comparing varieties of regression algorithms such as least squares regression,least absolute shrinkage and selection operatorregression,ridge regression,elastic net regression,supporting vector regression,and random forest regression,the relationship betweenthe microscopic properties of metal hydride materials and their macroscopic formation energy are established. Results show that randomforest regression have the best prediction performance,with lowest relative errors on both the training and test sets of 3.078 and 8.2011,high R-squared values,and great generalization and regression abilities. SHAP analysis reveals extreme and mean value of ground stateatom of metal hydride exhibit the greatest SHAP value of 5.56 and 1.26,suggesting their significant influence on the formation energy.Analysis for the prediction value of Mg-base,Ca-base,AB type,AB2 type,and AB5 type metal hydrides shows the highest relative errorbelow 9%,further proving the accuracy and universality of the model for all types of metal hydride. This model can be used to predict theformation enthalpy of unknown datasets.