Abstract Background Patients with chronic kidney disease (CKD) exhibited a pronounced burden of cardiac mortality. However, early prediction of cardiovascular mortality risk in CKD patients remains an unmet medical need. Purpose This study aimed to evaluate the performance of machine learning (ML) algorithms and identify the most influential factors in predicting long-term cardiac mortality among CKD patients. Methods Six ML models were developed, with the most effective one chosen for predicting and categorising patients into high-risk and low-risk groups based on the maximal Youden’s index. Differences in survival rates were assessed using the log-rank test on Kaplan-Meier curves. Cox regression analysis was employed to investigate the relationship between ML-predicted risk scores and mortality. Furthermore, the SHapley Additive exPlanations (SHAP) method was implemented to provide personalised explanations for model decisions. Results The auto-encoder (AE) model achieved the highest AUC of 0.94, with a sensitivity of 80.95% and specificity of 96.34%. Compared to individuals in low-risk group, those in high-risk group exhibited a significantly elevated risk of cardiovascular mortality (adjusted hazard ratio [HR]: 48.24; P <0.001). According to the SHAP model, age, C-reactive protein, blood urea nitrogen and hypertension were identified as the four most influential factors in the AE model. Conclusions Our study successfully developed an AE machine learning model for predicting 10-year cardiovascular mortality among CKD patients. The combination of ML model and SHAP aids doctors in understanding key features in the model, improving their insight into decision-making related to disease severity assessment, thus facilitating early preventive strategies in clinical practice.