Magnesium, a vasodilator, anti-inflammatory, and pain reliever, could alter the pathophysiology of sickle cell pain crises. We hypothesized that intravenous magnesium would shorten length of stay, decrease opioid use, and improve health-related quality of life (HRQL) for pediatric patients hospitalized with sickle cell pain crises. The Magnesium for Children in Crisis (MAGiC) study was a randomized, double-blind, placebo-controlled trial of intravenous magnesium vs normal saline placebo conducted at 8 sites within the Pediatric Emergency Care Applied Research Network (PECARN). Children 4 to 21 years old with hemoglobin SS or Sbeta(0) thalassemia requiring hospitalization for pain were eligible. Children received 40 mg/kg of magnesium or placebo every 8 hours for up to 6 doses plus standard therapy. The primary outcome was length of stay in hours from the time of first study drug infusion, compared using a Van Elteren test. Secondary outcomes included opioid use and HRQL. Of 208 children enrolled, 204 received the study drug (101 magnesium, 103 placebo). Between-group demographics and prerandomization treatment were similar. The median interquartile range (IQR) length of stay was 56.0 (27.0-109.0) hours for magnesium vs 47.0 (24.0-99.0) hours for placebo (P = .24). Magnesium patients received 1.46 mg/kg morphine equivalents vs 1.28 mg/kg for placebo (P = .12). Changes in HRQL before discharge and 1 week after discharge were similar (P > .05 for all comparisons). The addition of intravenous magnesium did not shorten length of stay, reduce opioid use, or improve quality of life in children hospitalized for sickle cell pain crisis. This trial was registered at www.clinicaltrials.gov as #NCT01197417.