This paper describes a driving control algorithm for four-wheel-drive (4WD) electric vehicles equipped with two motors at front and rear driving shafts to improve vehicle maneuverability, lateral stability, and rollover prevention. The driving control algorithm consists of the following three parts: 1) a supervisory controller that determines the control mode, the admissible control region, and the desired dynamics, such as the desired speed and yaw rate; 2) an upper level controller that computes the traction force input and the yaw moment input to track the desired dynamics; and 3) a lower level controller that determines actual actuator commands, such as the front/rear driving motor torques and independent brake torques. The supervisory controller computes the admissible control region, namely, the relationship between the vehicle speed and the maximum curvature of the vehicle considering the maximum steering angle, lateral stability, and rollover prevention. In the lower level controller, a wheel slip controller is designed to keep the slip ratio at each wheel below a limit value. In addition, an optimization-based control allocation strategy is used to map the upper level and wheel slip control inputs to actual actuator commands, taking into account the actuator constraints. Numerical simulation studies have been conducted to evaluate the proposed driving control algorithm. It has been shown from simulation studies that vehicle maneuverability, lateral stability, and rollover mitigation performance can be significantly improved by the proposed driving controller.