The prediction of the glass-forming ability (GFA) of metallic glasses (MGs) can accelerate the efficiency of their development. In this paper, a dataset was constructed using experimental data collected from the literature and books, and a machine learning-based predictive model was established to predict the GFA. Firstly, a classification model based on the size of the critical diameter (Dmax) was established to determine whether an alloy system could form a glass state, with an accuracy rating of 0.98. Then, regression models were established to predict the crystallization temperature (Tx), glass transition temperature (Tg), and liquidus temperature (Tl) of MGs. The R2 of the prediction model obtained in the test set was greater than 0.89, which showed that the model had good prediction accuracy. The key features used by the regression models were analyzed using variance, correlation, embedding, recursive, and exhaustive methods to select the most important features. Furthermore, to improve the interpretability of the prediction model, feature importance, partial dependence plot (PDP), and individual conditional expectation (ICE) methods were used for visualization analysis, demonstrating how features affect the target variables. Finally, taking Zr-Cu-Ni-Al system MGs as an example, a prediction model was established using a genetic algorithm to optimize the alloy composition for high GFA in the compositional space, achieving the optimal design of alloy composition.