In older adults with hypertension, hip fractures accompanied by preoperative acute heart failure significantly elevate surgical risks and adverse outcomes, necessitating timely identification and management to improve patient outcomes. This study aims to enhance the early recognition of acute heart failure in older hypertensive adults prior to hip fracture surgery by developing a predictive model using logistic regression (LR) and machine learning methods, optimizing preoperative assessment and management. Employing a retrospective study design, we analyzed hypertensive older adults who underwent hip fracture surgery at Hebei Medical University Third Hospital from January 2018 to December 2022. Predictive models were constructed using LASSO regression and multivariable logistic regression, evaluated via nomogram charts. Five additional machine learning methods were utilized, with variable importance assessed using SHAP values and the impact of key variables evaluated through multivariate correlation analysis and interaction effects. The study included 1,370 patients. LASSO regression selected 18 key variables, including sex, age, coronary heart disease, pulmonary infection, ventricular arrhythmias, acute myocardial infarction, and anemia. The logistic regression model demonstrated robust performance with an AUC of 0.753. Although other models outperformed it in sensitivity and F1 score, logistic regression's discriminative ability was significant for clinical decision-making. The Gradient Boosting Machine model, notable for a sensitivity of 95.2%, indicated substantial capability in identifying patients at risk, crucial for reducing missed diagnoses. We developed and compared efficacy of predictive models using logistic regression and machine learning, interpreting them with SHAP values and analyzing key variable interactions. This offers a scientific basis for assessing preoperative heart failure risk in older adults with hypertension and hip fractures, providing significant guidance for individualized treatment strategies and underscoring the value of applying machine learning in clinical settings.