The widespread application of artificial intelligence has injected new momentum into the development of ship risk models. By utilizing machine learning techniques, these models can fully mine maritime navigation data, thereby improving their accuracy and applicability. However, machine learning models often have a 'black box' characteristic that makes the decision-making process difficult to understand intuitively. To address this issue, this paper proposed an interpretable ship risk model based on machine learning and SHAP interpretation technique. The method is built upon weather data and ship accident data to construct a machine learning-based risk prediction model. Subsequently, the SHAP attribution method is introduced for interpretability analysis of the model, quantifying the impact of each feature variable on the model's output and identifying key risk factors. Finally, based on the analysis results, the model's features are optimized, retaining only the most critical features that contribute to the model's prediction. The results show that in the four areas studied, LSTM shows high stability in recall, with average volatility of 0.77 %, 0.21 %, 0.04 % and 0.29 % respectively, and XGBoost has high stability in precision index, which is 0.02 %, 0.04 %, 0.03 % and 0.03 % respectively. It can be seen that the method enables accurate evaluation of ship risk levels, provides precise analysis of the influence of each feature on the model, and reduces the number of features while ensuring prediction accuracy, thereby effectively reducing the model's computational cost and enhancing its overall efficiency and practicality.