Distributed drive electric vehicles can reduce range anxiety through regenerative braking. However, if the wheel motor torque output fails, it will form an additional yaw moment to the vehicle, causing instability, or deviation and threatening its safety. To solve this problem, the research object is an electric vehicle driven by a four-wheel hub motor. A braking force compensation distribution strategy for front and rear axles is proposed, which combines electronic hydraulic braking (EHB) system compensation control and deviation auxiliary control. Firstly, a fault detection module is established, and the motor’s output torque is estimated by designing a torque observer to obtain the fault degree information of the motor. Secondly, to fully use the motor’s regenerative braking force, the fault-free and faulty electro-hydraulic braking force distribution strategies are designed in the coordinated distribution layer of the electro-hydraulic braking system. The corresponding electro-hydraulic braking force compensation method is selected according to the fault degree of the regenerative braking function, the position of the faulty wheel, and the braking strength. Then, a deviation auxiliary controller is designed based on the model predictive control, and the intervention time of the auxiliary controller is determined according to the vehicle’s state. Finally, the control method is verified based on CarSim/Simulink co-simulation and hardware-in-the-loop (HIL) platform. The test results show that the designed control method can effectively compensate for the regenerative braking failure of random wheel and ensure the braking safety of the vehicle.