Postpartum depression (PPD) is one of the most common mental health conditions during the perinatal and postpartum periods, which can have adverse effects on both mother and infant. To investigate the efficacy of perioperative adjunctive esketamine administration after cesarean deliveries in the prevention of PPD. A single-center, double-blind, placebo-controlled, randomized clinical trial was conducted from January 1, 2022, to January 1, 2023, at Fujian Provincial Hospital among 298 women aged 18 to 40 years, with an American Society of Anesthesiologists grade I to III classification and singleton full-term pregnancies who were scheduled for elective cesarean deliveries. Primary analyses were performed on a modified intention-to-treat basis. Patients were randomly assigned to the esketamine (n = 148) and control (n = 150) groups. Those in the esketamine group received a single intravenous injection of 0.25 mg/kg of esketamine immediately after fetal delivery, followed by 50 mg of esketamine as an adjuvant in patient-controlled intravenous analgesia for 48 hours after surgery. Saline was given to the control group of patients. The primary outcome was assessments of PPD symptoms by using the Edinburgh Postnatal Depression Scale (EPDS) at postpartum day 7. Positive screening for PPD was defined as a score of 10 or more points on the EPDS. In addition, the EPDS was analyzed as a continuous variable to evaluate depressive symptoms. Secondary outcomes included the Numeric Rating Scale (NRS) of postoperative pain, along with safety evaluations including adverse events and clinical assessments at postpartum days 14, 28, and 42. A total of 298 pregnant women were included, with 150 in the control group (median age, 31.0 years [IQR, 29.0-34.0 years]) and 148 in the esketamine group (median age, 31.0 years [IQR, 28.0-34.0 years]). The prevalence of depression symptoms was significantly lower among patients given esketamine compared with controls (23.0% [34 of 148] vs 35.3% [53 of 150]; odds ratio, 0.55; 95% CI, 0.33-0.91; P = .02) on postpartum day 7. In addition, the esketamine group also showed a significantly lower change in EPDS scores (difference of least-squares means [SE], -1.17 [0.44]; 95% CI, -2.04 to -0.31; effect size, 0.74; P = .008). However, there were no differences between the groups in the incidence of positive screening results for PPD or in changes from the baseline EPDS scores at postpartum days 14, 28, and 42. There were no differences in NRS scores at rest and on movement except on movement at 72 hours postoperatively, when scores were significantly lower in the esketamine group (median, 3.0 [IQR, 2.0-3.0] vs 3.0 [IQR, 3.0-3.5]; median difference, 0 [95% CI, 0-0]; P = .03). These results suggest that intravenous administration of esketamine during the perioperative period of elective cesarean delivery can improve depression symptoms during the early postpartum period. However, this antidepression effect may not be universally applicable to patients with low EPDS scores. Chinese Clinical Trial Registry Identifier: ChiCTR2100054199.