The study developed a predictive model for in-hospital new-onset atrial fibrillation (NOAF) in older adults with hypertension and acute myocardial infarction based on data from 2140 patients from Qinhuangdao First Hospital. Key predictors include age, left atrial diameter, ejection fraction, white blood cell count, triglycerides, low-density lipoprotein, NT-proBNP, and potassium, selected by Borut, LASSO regression, and logistic regression methods. The model was built using multivariate logistic regression and explained by SHAP values for better interpretability. The nomogram achieved excellent discrimination with an AUC of 0.895 in the training set and 0.883 in the validation set, confirmed by ROC curves, calibration curves, decision curve and clinical impact curves. The developed interactive web tool provides real-time NOAF risk predictions. The model improves clinical relevance for early detection and personalized treatment of high-risk patients.