Background: The benefits of intraoperative magnesium supplementation have been reported. In this prospective, randomized study, the effects of magnesium supplementation during general anesthesia on emergence agitation and postoperative pain in children were evaluated.Methods: A total of 66 children aged 2 to 5 years who underwent strabismus surgery were assigned to the magnesium or to the control group. Preoperative anxiety was assessed using the modified Yale Preoperative Anxiety Scale. After anesthesia induction, the magnesium group received an initial loading dose of 30 mg/kg magnesium sulphate over 10 min and, then, continuous infusion of 10 mg/kg per h until 10 min before the end of the surgery. The control group received an equal volume of normal saline via the same regimen. The Pediatric Anesthesia Emergence Delirium (PAED) score, pain score, and respiratory events were assessed at the postanesthetic care unit.Results: Data obtained from 65 children were analyzed. The PAED and pain scores of the two groups did not differ significantly. There were 26 of 33 (78.8%) and 27 of 32 (84.4%) children with emergence agitation in the control and the magnesium groups, respectively (odds ratio 0.69, 95% CI 0.19–2.44; p = 0.561). The preoperative anxiety score was not significantly correlated with the PAED score. The incidence of respiratory events during the emergence period did not differ significantly between the two groups. Conclusions: Magnesium supplementation during anesthesia had no significant effects on the incidence of emergence agitation or postoperative pain in children undergoing strabismus surgery.Clinical trial registry: ClinicalTrials.gov (NCT03132701)