This paper proposes a model predictive control (MPC) algorithm for trajectory tracking of vehicles. Using MPC can reduce tracking errors and random disturbances in complex environments in time. According to the linear kinematics model of the vehicle, a kinematics trajectory tracking controller and an electromechanical coupling dynamics trajectory tracking controller are designed. The drive system of the electrically driven tracked vehicle is non-linear, and an electromagnetic system and mechanical system interact with each other. Taking the electromechanical coupling characteristics into consideration can ensure the matching of the electromechanical performance and the stability of the system during the trajectory tracking control. To verify the algorithm, kinematic simulations and dynamic simulations are performed. The simulation results show that the algorithm has good tracking ability. In addition, a set of test devices is designed to confirm the performance of the trajectory-tracking control algorithm in a real environment. Vision recognition is used to obtain vehicle deviation, and the Kalman filter is used to reduce signal interference. The result shows that the algorithm can meet trajectory tracking requirements.