Electronically controlled air suspension systems have been used in vehicles to improve ride comfort and handling safety by adjusting vehicle height. This paper proposes a new nonlinear controller to adjust the height of the vehicle sprung mass (height control) and to regulate the roll and pitch angles of the vehicle body (leveling control) by an air suspension system. A sliding mode control algorithm is designed to improve the tracking accuracy of the control and to overcome nonlinearities and uncertainties in the air suspension system. A mathematical model of the air suspension system is formulated in a nonlinear affine form to describe the dynamic behavior of the system and to derive the control algorithm. The sliding mode observer is also designed to estimate the pressures inside four air springs. The effectiveness and performance of the proposed control algorithm are verified by simulations and actual vehicle tests.