To enhance the response speed and accuracy of the motor in a four-wheel side motor-driven electric vehicle for improved vehicle handling stability, this paper proposes a chaotic adaptive sparrow-optimized PID control algorithm. Firstly, the structural principles of the four-wheel side motor-driven electric vehicle are analyzed. A mathematical model and a simulation model of the electric vehicle are established, and the accuracy of the model is verified through simulation experiments. Subsequently, the traditional sparrow algorithm is improved using Logistic-Tent chaotic mapping, adaptive search parameters, and the Levy flight strategy. These modifications enable the algorithm to escape local optima and achieve better convergence speed and accuracy. Based on these improvements, the ALSSA-PID control algorithm is developed, and the motor model is simulated and tested. Finally, a physical control platform for the wheel-edge motor is constructed to test the control algorithm. The results indicate that the rise time of the ALSSA-PID control algorithm is reduced by an average of 40.59% and 5.66% compared to open-loop control and SSA-PID control at various control speeds, respectively, while the stabilization time is reduced by an average of 27.72% and 15.59%. These findings demonstrate that the proposed control algorithm significantly improves the control performance of the wheel-edge motor control system.