This paper presents a numerical simulation study and a machine learning based prediction of the melting process in the Tube-in-shell thermal storage device. The two-dimensional Tube-in-shell thermal storage devices models are built to represent the position of the inner tube by two parameters, the eccentricity distance e and the eccentricity angle θ. The melting process of phase change material (PCM) under different conditions is simulated using computational fluid dynamics (CFD) to determine the effects of the inner tube position, inner tube radius and heating temperature on the variation of liquid phase fraction. Then, on this basis, a neural network of HHO-BP is constructed and trained by simulation data to predict the change of liquid phase fraction when the PCM melts under other conditions. The results show that the change of position in the vertical direction of the inner tube has a great influence on the melting. However, the change in the position of the inner tube in the horizontal direction has little effect on the melting rate, and the melting time is almost the same. In addition, the inner tube radius and the heating temperature both contribute significantly to the melting rate. The melting time of the model with an inner tube radius of 20 mm is 51.08 % faster than that of the model with an inner tube radius of 10 mm. The liquid phase fraction distributions of the models with heating temperatures of 60 °C and 70 °C are 0.697 and 0.935 when the melting of the models with heating temperature of 80 °C is completed. The prediction data of the HHO-BP neural network can respond to the simulation results more accurately, and all kinds of evaluation indexes are within the acceptable range. The machine learning model developed in this paper can reduce the simulation computation cost and shorten the optimization design cycle.