Postcesarean pain remains a major complaint from puerperium women who have undergone cesarean section, especially uterine contraction induced visceral pain. The optimal opioid for pain relief after cesarean section (CS) is still unclear. The goal of this study was to compare the analgesic effect of Nalbuphine to Sufentanil in patients who underwent CS. Patients and Methods: In this single-center retrospective cohort study, we included patients who received Nalbuphine or Sufentanil Patient-Controlled Intravenous Analgesia (PCIA) after CS between 1 January 2018 and 30 November 2020. Data on a Visual Analog Scale (VAS) at uterine contraction, at rest, and at movement, analgesic consumption, and side effects were collected. We performed logistic regression to identify predictors of severe uterine contraction pain. Results: A total of 674 patients were identified in the unmatched cohort, and 612 patients in the matched one. Compared to the Sufentanil group, lower VAS-contraction was recorded in the Nalbuphine group in both the unmatched and matched cohorts, the mean difference (MD) on POD1 was 0.35 (95% CI: 0.17 to 0.54, p<0.001) and 0.28 (95% CI: 0.08 to 0.47, p<0.001), respectively, and the MD of POD2 was 0.12 (95% CI: 0.03 to 0.40, P=0.019) and 0.12 (95% CI: 0.03 to 0.41, P=0.026), respectively. On POD1 but not POD2, VAS-movement was lower in the Nalbuphine group as compared to the Sufentanil group. No difference was found between VAS-rest on POD1 and POD2 in both unmatched and matched cohorts. Less analgesic consumption, and side effects were recorded in the Nalbuphine group. Logistic regression indicated that multipara and analgesic consumption were risk factors for severe uterine contraction pain. In subgroup analysis, VAS-contraction was meaningfully reduced in the Nalbuphine group compared with the Sufentanil group in multipara patients, but not primiparas. Conclusion: Compared to Sufentanil, Nalbuphine may provide better analgesia on uterine contraction pain. The superior analgesia may only exhibit in multiparas.