The paper studies an all fiber high-speed magneto-optic switch which includes an optical route, a nanosecond pulse generator, and a magnetic field module in order to reduce the switching time of the optical switch in the all optical network. A compact nanosecond pulse generator can be designed based on the special character of the avalanche transistor. The output current pulse of the nanosecond pulse generator is less than 5 ns, while the pulse amplitude is more than 100 V and the pulse width is about 10 to 20 ns, which is able to drive a high-speed magnetic field. A solenoid is used as the magnetic field module, and a bismuth-substituted rare-earth iron garnet single crystal is chosen as the Faraday rotator. By changing the direction of current in the solenoid quickly, the magnetization of the magneto-optic material is reversed, and the optical beam can be rapidly switched. The experimental results indicate that the switching time of the device is about 100 to 400 ns, which can partially meet the demand of the rapid development of the all optical network.