failure is still one of the prominent causes of morbidity and mortality globally, and thus, determining the principal factors influencing survival in patients becomes crucial. Being able to predict survival is critical for optimizing patient treatment and management. Heart failure, with its multifactorial and involvement of numerous clinical variables, complicates prediction of survival rates in patients. This study utilizes the "Heart Failure Clinical Records" dataset to analyze and predict patient survival based on two separate approaches: survival analysis and machine learning (ML) classification. Specifically, we employ the Cox Proportional Hazards Model to assess the influence of clinical variables like "age", "serum creatinine", and "ejection fraction" on survival durations. Additionally, machine learning classification models like K-Nearest Neighbors (KNN), Decision Trees (DT), and Random Forests (RF) are implemented to predict the binary response variable of survival (DEATH_EVENT). Data preprocessing is carried out using methods like feature scaling, imputation of missing values, and balancing the classes for the improvement of model performance. Among the evaluated models, the Random Forest classifier, when integrated with feature selection derived from the Cox model, reached the best performance with 96.2% accuracy and an AUC ROC of 0.987, outperforming all other approaches. The results indicate that integrating survival analysis with machine-learning techniques is effective in heart failure prediction outcomes, providing valuable support for patient management and clinical decision-making.