Objective: This study aimed to investigate the impact of varying dosages of S-ketamine on perioperative immune-inflammatory responses in patients undergoing modified radical mastectomy (MRM).Methods: This is a prospective, randomized, controlled trial. A total of 136 patients with American Society of Anesthesiologists status I/II scheduled for MRM were enrolled and randomly assigned into groups to receive the control (C) or one of three different doses [0.25 (L-Sk), 0.5 (M-Sk), or 0.75 (H-Sk) mg/kg] of S-ketamine. The primary outcomes were the cellular immune function and inflammatory factors before anesthesia and at the end of (T1) and 24 h (T2) after the surgery. Secondary outcomes included the visual analog scale (VAS) score, opioid consumption, rate of remedial analgesia, adverse events, and patient satisfaction.Results: The percentage and absolute counts of CD3+ and CD4+ cells in groups L-Sk, M-Sk, and H-Sk were higher than those of group C at T1 and T2. Moreover, a pairwise comparison revealed that the percentage in group H-Sk was higher than those in the L-Sk and M-Sk groups (p < 0.05). The ratio of CD4+/CD8+ was lower in group C at T1 and T2 than those in groups M-Sk and H-Sk (p < 0.05). There was no significant difference in the percentage and absolute counts of natural killer (NK) cells and B lymphocytes among the four groups. However, compared with group C, the concentrations of white blood cells (WBC), neutrophils (NEUT), hypersensitive C-reactive protein (hs-CRP), the neutrophil-to-lymphocyte ratio (NLR), systemic inflammation response index (SIRI), and systemic immune-inflammation index (SII) at T1 and T2 in three different doses of S-ketamine groups were significantly low, and the lymphocytes were significantly high. The ratio of SIRI and NLR at T2 in group M-Sk was lower than that in group L-Sk (p < 0.05). Additionally, a significant decrease in VAS score, opioid consumption, rates of remedial analgesia, and adverse events was observed in the M-Sk and H-Sk groups.Conclusion: Collectively, our study demonstrates that S-ketamine could reduce opioid consumption, decrease postoperative pain intensity, exert a systemic anti-inflammatory effect, and attenuate immunosuppression in patients undergoing MRM. Moreover, we found that the effects of S-ketamine are related to the dose used, with significant differences observed in 0.5 or 0.75 mg/kg of S-ketamine.Clinical Trial Registration:chictr.org.cn, identifier ChiCTR2200057226.