Patients undergoing cardiac valve replacement may experience cardiovascular adverse events during the preoperative period before anesthesia. The study was to compare the preemptive anti–stress response effects of oxycodone versus sufentanil for patients undergoing cardiac valve replacement. Ninety‐four patients were enrolled and assigned to group Oxy, group Suf and group NS. Patients in group Oxy were administrated with oxycodone 0.1 mg/kg, group Suf received sufentanil 0.1 μg/kg and group NS were given equivalent volume of normal saline. The primary outcomes included serum levels of cortisol, norepinephrine, and adrenaline. The secondary outcomes involved bispectral index value and the observer's assessment of awareness/sedation grade, levels of mean arterial pressure, heart rate, and the adverse reactions. Compared to group NS, the serum levels of cortisol at T1 to T5 (P < .05), and levels of norepinephrine and adrenaline at T3 to T5 (P < .05) in group Oxy and Suf were lower. The bispectral index value and observer's assessment of awareness/sedation grade T1 to T2 (P < .05) in group Suf were lower than those in group Oxy and NS. Compared with group NS, the levels of mean arterial pressure and heart rate in group Oxy and Suf at T3 to T5 (P < .05) were lower. The incidence of coughing was significantly higher in group Suf (23.3%), but not in group NS (6.7%), than that in group Oxy (3.3%). The preemptive analgesia of oxycodone may be used to inhibit the stress response, without leading to excessive sedation and respiratory depression, which may also help to stabilize hemodynamics during preoperative period.