Objective To investigate the application effect of ultrasound⁃guided paravertebral nerve block in heart valve replacement. Methods A total of 102 patients undergoing heart valve replacement were selected as the research subjects, and they were divided into observation group or control group by the random number table method, with 51 cases in each group. Patients in the observation group received ultrasound⁃guided paravertebral nerve block, while patients in the control group received ultrasound⁃guided transversus thoracis muscle plane block. Both groups received general anesthesia after nerve block. The heart rate and mean arterial pressure (MAP) at tracheal intubation (T1), sternal splitting (T2), pericardial incision (T3), and chest closure (T4), the postoperative dosage of analgesics, the postoperative number of analgesic pump compressions, the levels of inflammatory factors (C⁃reactive protein [CRP], interleukin [IL]⁃6, tumor necrosis factor [TNF]⁃α) and stress indicators (adrenocorticotropic hormone [ACTH], cortisol, lactic acid) before surgery and 24 hours after surgery, as well as the occurrence of adverse reactions and death were compared between the two groups. Results The MAP and heart rate at T2 in both groups were lower than those at T1, the MAP and heart rate at T3 were lower than those at T1 and T2, and the MAP and heart rate at T4 were lower than those at T1 but higher than those at T3 (P<0.05). At T2, T3, and T4, the MAP and heart rate in the observation group were higher than those in the control group (P<0.05). The postoperative dosage of analgesics and the postoperative number of analgesic pump compressions in the observation group were less than those in the control group (P<0.05). The postoperative levels of serum CRP, IL⁃6, TNF⁃α, ACTH, cortisol, and lactic acid in both groups were higher than those before surgery, but the above indicators in the observation group were lower than those in the control group (P<0.05). There was no statistically significant difference in the total incidence rate of adverse reactions between the two groups (P>0.05). No death occurred in either group. Conclusion Compared with ultrasound⁃guided transversus thoracis muscle plane block, ultrasound⁃guided paravertebral nerve block applied in heart valve replacement can better stabilize intraoperative hemodynamics, enhance the analgesic effect, effectively inhibit postoperative inflammatory response and stress response, and has good safety.