Epidural anesthesia is a primary choice for cesarean delivery, but supplemental analgesics are often required to relieve pain during uterine traction. To investigate the sedative and analgesic effects of intravenous esketamine administered before childbirth via cesarean delivery with the patient under epidural anesthesia. This multicenter, double-blind randomized clinical trial assessed 903 women 18 years or older who had full-term single pregnancy and were scheduled for elective cesarean delivery with epidural anesthesia in 5 medical centers in China from September 18, 2021, to September 20, 2022. Patients were randomized to receive intravenous injection of 0.25 mg/kg of esketamine or placebo before incision. The coprimary outcomes included scores on the numeric rating scale of pain (an 11-point scale, with 0 indicating no pain and 10 indicating the worst pain; a difference of ≥1.65 points was clinically meaningful) and Ramsay Sedation Scale (a 6-point scale, with 1 indicating restlessness and 6 indicating deep sleep without response; a difference of ≥2 points was clinically meaningful) immediately after fetal delivery. Secondary outcomes included neonatal Apgar score assessed at 1 and 5 minutes after birth. A total of 600 women (mean [SD] age, 30.7 [4.3] years) were enrolled and randomized; all were included in the intention-to-treat analysis. Immediately after fetal delivery, the score on the numeric rating scale of pain was lower with esketamine (median [IQR], 0 [0-1]) than with placebo (median [IQR], 0 [0-2]; median difference, 0; 95% CI, 0-0; P = .001), but the difference was not clinically important. The Ramsay Sedation Scale scores were higher (sedation deeper) with esketamine (median [IQR], 4 [3-4]) than with placebo (median [IQR], 2 [2-2]; median difference, 2; 95% CI, 2-2; P < .001). The neonatal Apgar scores did not differ between the 2 groups at 1 minute (median difference, 0; 95% CI, 0-0; P = .98) and at 5 minutes (median difference, 0; 95% CI, 0-0; P = .27). Transient neurologic or mental symptoms were more common in patients given esketamine (97.7% [293 of 300]) than in those given placebo (4.7% [14 of 300]; P < .001). For women undergoing cesarean delivery under epidural anesthesia, a subanesthetic dose of esketamine administered before incision produced transient analgesia and sedation but did not induce significant neonatal depression. Mental symptoms and nystagmus were common but transient. Indications and the optimal dose of esketamine in this patient population need further clarification, but study should be limited to those who require supplemental analgesia. ClinicalTrials.gov Identifier: NCT04548973.