(1) Background: Postpartum depression (PPD) is a common complication after cesarean section. Recent studies have shown that intravenous S-ketamine during surgery could be effective in preventing PPD. However, no evidence shows S-ketamine used in patient-controlled intravenous analgesia (PCIA) could reduce the incidence of PPD. Our aim was to explore the effect of S-ketamine as an adjuvant in patient-controlled intravenous analgesia (PCIA) for prevention of postpartum depression. (2) Methods: In a single center, 375 parturients scheduled to undergo cesarean section were recruited and randomly assigned to two groups: Control group (C group) or S-ketamine group (S group). Parturients in both groups received PCIA, the formula of Group C: sufentanil 2 μg/kg + tropisetron 10 mg, S group was the same as C group except 0.5mg/kg S-ketamine. The primary outcome was the incidence of PPD measured by the Edinburgh Postnatal Depression Scale (EPDS) after surgery. The secondary outcomes were EPDS scores, Visual analogue scale (VAS) scores, and Ramsay Sedation Scale (RSS) scores, and incidence of related adverse events. (3) Results: A total of 275 puerpera were finally included and randomly assigned to two groups. The incidence of depression at postoperative 3, 14, 28days in C group and S group were 17.6%vs8.2%, P<0.05;24.2%vs9.8%, P<0.05, and 19.0%vs 17.2%, P=0.76, respectively). As for EPDS scores, C group and S group at 3,14, and 28 days after cesarean were 7.65±3.14vs6.00±2.47, p<0.05,7.62±3.14vs6.38±2.67, p<0.05, and 7.35±3.17vs6.90±2.78, p=0.15, respectively. Adverse events such as headache and nausea were 3.3% vs 4.1%, p=0.755; 5.9%vs8.2%, p=0.481. (4) Conclusions: 0.01mg/kg/h S-ketamine as an adjuvant in patient-controlled intravenous analgesia can significantly reduce the incidence of postpartum depression within 14 days and relieve postoperative pain within 48h after cesarean section, without increasing the incidence of adverse reactions.Trial registration: ChiCTR, ChiCTR2100050263,retrospectively registered. Registered 24/08/2021.