We solve the Riemann problem for the deceleration of arbitrarily magnetized relativistic ejecta injected into a static unmagnetized medium. We find that for the same initial Lorentz factor, the reverse shock becomes progressively weaker with increasing magnetization s (the Poynting-to-kinetic energy flux ratio), and the shock becomes a rarefaction wave when s exceeds a critical value, sc, defined by the balance between the magnetic pressure in the ejecta and the thermal pressure in the forward shock. In the rarefaction wave regime, we find that the rarefied region is accelerated to a Lorentz factor that is significantly larger than the initial value. This acceleration mechanism is due to the strong magnetic pressure in the ejecta