Brain edema is a fatal complication of acute ischemic stroke and associated with worse outcomes in patients. This study was designed to evaluate the effects of magnesium sulfate on vasogenic brain edema formation and blood–brain barrier (BBB) disruption caused by ischemia-reperfusion (IR) in a rat model of ischemic stroke. A total of 72 male Sprague-Dawley rats were categorized into the following three primary groups: sham, control ischemic, magnesium-sulfate-treated (300 mg/kg loading dose, followed by an additional 100 mg/kg) ischemic (n = 24 in each group). Transient focal cerebral ischemia was induced by 60-min-long occlusion of the left middle cerebral artery, followed by 24-h-long reperfusion. Sensorimotor deficits, infarct volume, and brain edema were evaluated at the end of the reperfusion period. The BBB permeability was assessed by Evans Blue extravasation technique. Lipid peroxidation levels were assessed by measuring the malondialdehyde content in the brain tissue homogenate, and the activities of the antioxidant enzymes superoxide dismutase, catalase, and glutathione peroxidase were detected according to the technical manual of the assay kits. Induction of cerebral ischemia in the control group produced considerable BBB damage in conjunction with severe brain edema formation. Treatment with magnesium sulfate significantly attenuated brain edema and protected BBB integrity in the ischemic lesioned hemisphere. In addition, magnesium sulfate reduced lipid peroxidation and increased antioxidant protection of brain tissue by upregulating the activities of antioxidant enzymes. Treatment with magnesium sulfate protected BBB integrity against IR-induced damage and reduced vasogenic edema formation partly via antioxidant mechanisms in a rat model of acute ischemic stroke.