Direct yaw moment control can maintain the vehicle stability in critical situation. For four-wheel independently driven (4WD) electric vehicle with in-wheel motors (IWMs), direct yaw moment control (DYC) can be easily achieved. A fairly accurate calculation of the required yaw moment can improve vehicle stability. A novel sliding mode control (SMC) technique is employed for the motion control so as to track the desired vehicle motion, which is it for different working circumstances compared to the well-used traditional DYC. Through the weighted least square algorithm, the lower controller is used to determine the torque properly allocated to each wheel according to the desired yaw moment. Several actuator constraints are considered in the control strategy. In addition, a nonlinear tire model is utilized to improve the accuracy of tire lateral force estimation. Then, simulations are carried out and the values of vehicle states are compared. The simulation results show that the control system proposed can effectively improve the handling stability of the vehicle.