A two-passenger, all-wheel-drive urban electric vehicle (AUTO21EV) with four direct-drive in-wheel motors has been designed and developed at the University of Waterloo. A 14-degree-of-freedom model of this vehicle has been used to develop a genetic fuzzy yaw moment controller. The genetic fuzzy yaw moment controller determines the corrective yaw moment that is required to stabilize the vehicle, and applies a virtual yaw moment around the vertical axis of the vehicle. In this work, an advanced torque vectoring controller is developed, the objective of which is to generate the required corrective yaw moment through the torque intervention of the individual in-wheel motors, stabilizing the vehicle during both normal and emergency driving maneuvers. Novel algorithms are developed for the left-to-right torque vectoring control on each axle and for the front-to-rear torque vectoring distribution action. Several maneuvers are simulated to demonstrate the performance and effectiveness of the proposed advanced torque vectoring controller, and the results are compared to those obtained using the ideal genetic fuzzy yaw moment controller. The advanced torque vectoring controller is also implemented in a hardware- and operator-in-the-loop driving simulator to further evaluate its performance.