The aim was to investigate the factors associated with the development of delirium after total hip arthroplasty and to develop a predictive model. The clinical data of 320 patients who underwent total hip arthroplasty between January 2021 and December 2023 were retrospectively analyzed, and 72 cases were classified as the delirium group and 248 cases were classified as the no delirium group based on the occurrence of delirium after surgery. One-way ANOVA was used to compare the differences in basic information between the 2 groups; statistically significant indicators were included in the binary logistic regression model to analyze in depth the associated factors affecting postoperative delirium after total hip arthroplasty and to construct a prediction framework. Binary logistic regression analysis revealed that age, history of chronic obstructive pulmonary disease, femoral neck fracture, duration of surgery, intraoperative bleeding, C-reactive protein level at 4 hours postoperatively, postoperative hypoxemia, resuscitation time (>= 1 hour), postoperative pain scores (>= 4), nutritional deficits, sleep disorders, and cognitive deficits were all significant risk factors for the occurrence of delirium after total hip arthroplasty significant risk factors for delirium after total hip arthroplasty. The prediction model constructed based on these factors had an overall prediction accuracy of 99.7%, and the Hosmer-Lemeshow test confirmed that the model had a good fit. The area under the curve of the model was 0.992 as internally validated by Bootstrap method, which proved that the accuracy of the constructed model was strong. Age, history of chronic obstructive pulmonary disease, femoral neck fracture, duration of surgery, intraoperative bleeding, 4-hour postoperative C-reactive protein level, postoperative hypoxemia, resuscitation time (>= 1 hour), postoperative pain score (>= 4), nutritional disorders, sleep disorders, and cognitive dysfunctions were risk factors for delirium after total hip arthroplasty, and the risk prediction model constructed based on this demonstrated excellent stability and prediction ability.