In this paper, the sliding mode control, a typical method of nonlinear adaptive control and robust control, is applied to a magnetic bearing system. It has its roots in the relay and bang-bang control theory. Sliding mode control is a high-speed switching feedback control; for example, the gains in each feedback path switch between two values according td certain rules. This control law drive system's state trajectory to a user-chosen surface in the state space is called the sliding surface for all subsequent time. The sliding surface is called the switching surface by another name because if the state trajectory is above the surface, a control path has one gain and a different gain if the trajectory drops below the surface. From this control, the system is restricted to this surface and is stabilized. This method is very robust for parameter change, modelling error, disturbance, and so on. The sliding mode control method is compared with the PID control method for the flexible rotor supported by magnetic bearings by simulation and experiments on both the lift off and the rotation.