Introduction: Robotic radical prostatectomy requires prolonged pneumoperitoneum and a steep Trendelenburg position. Magnesium can attenuate the stress response and hemodynamic perturbations. This study aimed to evaluate the effects of intravenous magnesium administration on hemodynamics and the stress response in patients undergoing robotic radical prostatectomy. Methods: In this prospective, double-blind, randomized controlled study, 52 patients undergoing robotic radical prostatectomy were randomized into two groups: 26 in the magnesium group and 26 in the control group. The patients in the magnesium group received magnesium sulfate 50 mg/kg intravenously, followed by infusion at a rate of 10 mg/kg/h during surgery. The patients in the control group received an equal volume of 0.9% saline. The primary outcomes were the changes in heart rate and mean arterial pressure (MAP) during surgery. The serum stress hormones (adrenocorticotropic hormone, cortisol, epinephrine, and norepinephrine) were also measured. Results: MAP showed a significant intergroup difference over time (Pgroup*time = 0.017); it increased significantly at 5 min after Trendelenburg position in the control group and decreased significantly at 30 min after Trendelenburg position in the magnesium group. The intergroup difference in the change in cortisol concentrations was significant over time (Pgroup*time = 0.006). The cortisol concentration decreased significantly from baseline to 24 h after surgery in the magnesium group but did not change significantly in the control group. The requirement for intraoperative remifentanil was 35% lower in the magnesium group (P = 0.011), and the severity of postoperative pain at 30 min and 6 h after surgery was also lower in the magnesium group (P = 0.024 and P = 0.015). Conclusion: There is a possibility that intravenous magnesium administration during robotic radical prostatectomy reduces the increases in arterial pressure, cortisol concentrations, opioid requirements, and postoperative pain. Trial Registration: ClinicalTrials.gov identifier, NCT02833038.