ObjectiveThe majority of individuals with femoral neck fractures opt for total hip replacement to enhance their quality of life. However, this group frequently exhibits perioperative symptoms of pain, anxiety, and sadness, which extends recovery time to some extent. Esketamine, the right-handed monomer of ketamine, is more popular these days due to its sedative, analgesic, and antidepressant properties. There are currently few domestic and international research on the use of esketamine in elderly individuals who have undergone surgery for a femoral neck fracture. In order to further cut the length of the hospital stay and hasten postoperative recovery, this study investigates whether esketamine postoperative analgesia can lessen postoperative pain, anxiety, and depression in older patients having hip replacement.Methods150 patients, ASA physical status I–II, aged ≥ 60 years, no limitation in gender, BMI 18–25 kg/cm2, who underwent selective total hip arthroplasty, according to random number table method, esketamine group (group A) and sufentanil group (group B) were randomized, 75 patients in each group. The two groups received general anesthesia method. At the end of the operation, PCIA was connected for analgesia. In group A, esketamine 2.5 mg/kg was mixed with normal saline to 100 ml. In group B, sufentanil 2.5 ug/kg was mixed with normal saline to 100 ml. Record the VAS scores after operation. Record the first ambulation time, ambulation distance and Patient-controlled Analgesia compression times after operation. The incidence of postoperative adverse reactions such as drowsiness, dizziness, nausea and vomiting, multilingual were recorded. ELISA was used to detect IL-6 and CRP in the morning, 24 h and 72 h after operation. The Hospital Anxiety and Depression Scale (HAD) score and Harris score at 3 days, 1 week and 1 month after operation were followed up.ResultsThere was no significant difference in VAS score and PCA compression times (P > 0.05), but the incidence of nausea, vomiting and dizziness in group B was higher than that in group A (P < 0.05). Compared with group B, the levels of IL-6 and CRP in group A at 24 h and 72 h after operation were significantly decreased (P < 0.05). Postoperative ambulation time and ambulation distance in group A were better than those in group B (P < 0.05). The HAD score of group A was lower than that of group B at 3 days and 1 week after operation (P < 0.05). However, there was no significant difference between the two groups at 1 month after operation (P > 0.05). The Harris score of group A was higher than that of group B at 3 days, 1 week and 1 month after operation (P < 0.05).ConclusionsEsketamine can reduce short-term postoperative anxiety and depression, relieve postoperative pain and stress response, shorten bed rest time after total hip replacement, and accelerate postoperative recovery.