Objective To establish a predictive model for medication compliance among acute heart failure(AHF)patients in order to enhance their therapeutic compliance and optimize clinical outcomes. Methods A total of 580 AHF inpatients at He Xian Memorial Hospital in Panyu District, Guangzhou between January 2021 and December 2023 were enrolled. Demographic information, disease-specific data,as well as post-discharge medication compliance records within six-month were collected by investigators. Utilizing logistic regression analysis revealed several influential determinants affecting medication compliance which formed the basis for constructing our predictive model. Results Generally,patient compliance was good(75%). The comparison between the good compliance group and the poor compliance group showed that there were significant differences in age, living alone,combined with underlying diseases, types of medication, disease understanding score, treatment confidence score and self-control confidence score(P<0. 05). Logistic regression analysis showed that independent risk indicators including individuals aged ≥60 years(odds ratio[OR]=1. 774), those living alone(OR=1. 871), presence of two or more underlying diseases(OR=1. 719), along with consumption of seven or more medications daily(OR=1. 456). Conversely,disease awareness score(OR=0. 923), treatment confidence score(OR=0. 946), and self-control confidence score(OR=0. 901)were identified as independent protective factors. Validation using receiver operating characteristic curves demonstrated robust predictive performance with an area under curve value of 0. 815(95%CI:0. 780-0. 850), affirming its efficacy. The calibration of the model was evaluated, with a P-value of 0. 528, indicating good fit of the predictive model. Additionally, the concordance index(C-index)of the model was 0. 738, suggesting its excellent predictive performance. The decision curve analysis revealed that the curve was above the extreme lines, with a net benefit rate ranging from 0 to 27% when the threshold probability falls between. Conclusions The medication compliance of AHF patients is influenced by various factors, including age, living arrangement, the number of underlying diseases, and the number of medications taken. Targeted interventions such as enhancing patient education, simplifying treatment regimens, and improving social support can effectively improve the medication compliance of AHF patients. The predictive model established in this study provides a scientific basis for clinicians to develop more precise and effective individualized intervention measures,thereby improving the prognosis and quality of life.