  We study the effects of magnetic fields on the evolution of differentially
rotating neutron stars, which can form in stellar core collapse or binary
neutron star coalescence. Magnetic braking and the magnetorotational
instability (MRI) both redistribute angular momentum; the outcome of the
evolution depends on the star's mass and spin. Simulations are carried out in
axisymmetry using our recently developed codes which integrate the coupled
Einstein-Maxwell-MHD equations. For initial data, we consider three categories
of differentially rotating, equilibrium configurations, which we label normal,
hypermassive and ultraspinning. Hypermassive stars have rest masses exceeding
the mass limit for uniform rotation. Ultraspinning stars are not hypermassive,
but have angular momentum exceeding the maximum for uniform rotation at the
same rest mass. We show that a normal star will evolve to a uniformly rotating
equilibrium configuration. An ultraspinning star evolves to an equilibrium
state consisting of a nearly uniformly rotating central core, surrounded by a
differentially rotating torus with constant angular velocity along magnetic
field lines, so that differential rotation ceases to wind the magnetic field.
In addition, the final state is stable against the MRI, although it has
differential rotation. For a hypermassive neutron star, the MHD-driven angular
momentum transport leads to catastrophic collapse of the core. The resulting
rotating black hole is surrounded by a hot, massive, magnetized torus
undergoing quasistationary accretion, and a magnetic field collimated along the
spin axis--a promising candidate for the central engine of a short gamma-ray
burst. (Abridged)
