Total knee arthroplasty (TKA) is recognized as the most effective surgical intervention for relieving pain and improving joint mobility and deformity in patients with knee osteoarthritis and other synovial diseases. The application of accelerated postoperative rehabilitation (enhanced recovery after surgery) has demonstrated its efficacy in improving patient outcomes, and early postoperative joint function exercise has become a key prognostic factor in knee replacement. The unexpected appearance of limb pain and swelling hindered the patient's tendency for early mobilization, leading in prolonged hospitalization, delayed functional recovery and negative psychological responses. To investigate the impact of incorporating programmed pain nursing with collaborative nursing on elderly patients undergoing knee replacement surgery. A retrospective analysis was conducted on a cohort of 116 patients who underwent TKA at our hospital between July 2019 and July 2021. The patients were divided into two groups: A control group (n = 58) receiving programmatic nursing, and an observed group (n = 58) receiving programmed nursing combined with a collaborative nursing model. A pain management team consisting of attending physicians, head nurses, and responsible nurses was established. Outcome measures included visual analogue scale (VAS) scores, activities of daily living (ADL) scale scores, and functional scores. The ADL scores of patients in both groups exhibited a continuous increase. However, there was no statistically significant difference in the ADL scores between the two groups at 48 h and the 7th d post-surgery (P > 0.05). Upon reexamination at the 3rd mo, the observation group demonstrated higher ADL scores compared to the control group (67.48 ± 14.69 vs 59.40 ± 16.06, P < 0.05). The VAS scores of both groups significantly decreased, with no significant difference observed between the groups at each time point (P > 0.05). The functional status of patients in both groups exhibited a gradual increase prior to intervention and at the 1st, 2nd, and 3rd month following discharge (P < 0.05). There was no statistically significant difference in knee joint function scores between the two groups at the 1st month after discharge (47.52 vs 45.81, P > 0.05). However, the knee joint function scores of patients in the observation group were significantly higher than those in the control group at the 2nd (59.38 vs 53.19, P < 0.05) and 3rd month (71.92 vs 64.34, P < 0.05) following discharge. The utilization of programmed pain nursing in conjunction with collaborative nursing for out-of-hospital care of TKA patients has demonstrated favorable outcomes, encompassing pain reduction, enhanced prognosis, and improved nursing quality for patients.