This paper presents a novel hierarchical control architecture designed for a four in-wheel electric vehicle (EV), integrating longitudinal and lateral control strategies to optimize performance and lateral stability. On one hand, a high-level longitudinal controller is synthesized to track a desired speed profile and generate a total torque. On the other hand, a direct yaw control (DYC) strategy is employed for steerability and stability control to generate a yaw moment. To manage the total torque as well as the yaw moment, a control allocation layer is employed. Subsequently, the formulation of the control allocation problem is presented, incorporating a gain-scheduling Daisy chaining Kalman filter (DCKF) control allocation to deal with actuator dynamics and fault tolerance. Results demonstrate enhanced performance in normal and emergency driving. Quick adaptability in case of emergency is achieved without overshooting or undershooting, with a smooth response.