Purpose: Studies have reported that preoperative poor sleep quality could decrease the pain threshold in patients undergoing noncardiac surgery. However, the risk of postoperative hyperalgesia (HA) in cardiac surgery patients with preoperative poor sleep quality remains unclear. Patients and Methods: We retrospectively collected clinical data from patients undergoing open-heart valve surgery between May 1 and October 31, 2019, in Fuwai Hospital (Beijing). We assessed preoperative sleep quality and postoperative pain severity using the Pittsburgh sleep quality index (PSQI) and numerical pain rating scale (NPRS), respectively. A PSQI of six or greater was considered to indicate poor sleep quality, and a NPRS of four or greater was considered to indicate HA. Multivariable logistic regression analysis was used to study the risk of postoperative HA in patients with preoperative poor sleep quality. Results: We divided 214 eligible patients into two groups based on postoperative HA; HA group: n=61 (28.5%) and nonHA group: n=153 (71.5%). Compared with nonHA patients, patients with postoperative HA showed a higher percentage of history of smoking, 17 (11.1%) vs 15 (24.6%) and alcohol abuse, 5 (3.3%) vs 6 (9.8%), higher intraoperative dose of sufentanil (median, 1.02 vs 1.12 μg/kg/h), and longer duration of ventilation with tracheal catheter (median, 760 vs 934 min). Preoperative poor sleep quality was associated independently with an increased risk of postoperative HA (adjusted odds ratio [AOR]: 2.66; 95%CI: 1.31-5.39, P=0.007). Stratification by history of smoking revealed a stronger risk of postoperative HA in nonsmoking patients with preoperative poor sleep quality (AOR: 3.40; 95%CI: 1.51-7.66, P=0.003). No risk was found in patients who had history of smoking (AOR: 0.83; 95%CI: 0.14-4.75, P=0.832). Conclusion: Preoperative poor sleep quality is an independent risk factor for postoperative HA in adult patients undergoing open-heart valve surgery who had no history of smoking.