The optimal control strategy for the decoupling of drive torque is proposed for the problems of runaway and driving stability in straight-line driving of electric vehicles driven by four-wheel hub motors. The strategy uses a hierarchical control logic, with the upper control logic layer being responsible for additional transverse moment calculation and driving anti-slip control; the middle control logic layer is responsible for the spatial motion decoupling for the underlying coordinated distribution of the four-wheel drive torque, on the basis of which the drive anti-skid control of a wheel motor-driven electric vehicle that takes into account the transverse motion of the whole vehicle is realized; the lower control logic layer is responsible for the optimal distribution of the driving torque of the vehicle speed following control. Based on the vehicle dynamics software Carsim2019.0 and MATLAB/Simulink, a simulation model of a four-wheel hub motor-driven electric vehicle control system was built and simulated under typical operating conditions such as high coefficient of adhesion, low coefficient of adhesion and opposing road surfaces. The research shows that the wheel motor drive has the ability to control the stability of the whole vehicle with large intensity that the conventional half-axle drive does not have. Using the proposed joint decoupling control of the transverse pendulum motion and slip rate as well as the optimal distribution of the drive force with speed following, the transverse pendulum angular speed and slip rate can be effectively controlled with the premise of ensuring the vehicle speed, thus greatly improving the straight-line driving stability of the vehicle.