This study aimed to evaluate the impact of different ultrasound-guided nerve blocks on the postoperative inflammatory and stress response in elderly patients undergoing total hip arthroplasty (THA), providing a theoretical foundation for clinical application. Elderly patients with THA who received ultrasound-guided nerve block combined with general anesthesia from June 2021 to June 2022 in the hospital were selected as a retrospective cohort study. Patients were divided into two groups based on the type of nerve block used. The observation group (n = 60) received ultrasound-guided pericapsular nerve group (PENG) block combined with femoral nerve block (FNB), while the control group (n = 60) received ultrasound-guided PENG block. The cortisol (Cor), tumor necrosis factor-α (TNF-α), interleukin-6 (IL-6), visual analogue scale (VAS) scores, and pain medication consumption in both groups were compared. The observation group demonstrated significantly lower serum levels of Cor, TNF-α, and IL-6 at postoperative 1 day, 3 days and 7 days, as well as lower soluble protein-100β (S100β) levels at postoperative 1 day compared to the control group (p < 0.001). The VAS score in the observation group was significantly lower than that in the control group at postoperative 1 day, 3 days and 7 days (p < 0.001), with no significant difference in preoperative VAS score between the two groups (p > 0.05). Additionally, opioid consumption in the observation group was significantly lower than that in the control group at postoperative 48 h (p < 0.001). The combination of ultrasound-guided PENG block and FNB effectively reduces postoperative pain and the inflammatory response in elderly patients undergoing THA, facilitating early recovery.