With rapid increase of vehicles on the road, safety concerns have become increasingly prominent. Since the leading cause of many traffic accidents is known to be by human drivers, developing autonomous vehicles is considered to be an effective approach to solve the problems above. Although trajectory tracking plays one of the most important roles on autonomous driving, handling the coupling between trajectory-tracking control and ESP under certain driving scenarios remains to be challenging. This paper focuses on trajectory-tracking control considering the role of ESP. A vehicle model is developed with two degrees of freedom, including vehicle lateral, and yaw motions .Based on the proposed model, the vehicle trajectory is separated into both longitudinal and lateral motion. The coupling effect of the vehicle and ESP is analyzed in the paper. The lateral trajectory-tracking algorithm is developed based on the preview follower theory. Spacing control strategy is used in longitudinal trajectory-tracking algorithm. Yaw angular velocity and lateral deflection are the control variables for ESP. When the vehicle is under certain driving scenarios remains to be challenging, the influence of ESP to trajectory-tracking control is considered. With the purpose to prove the trajectory-tracking accuracy, the couple between the trajectory-tracking and ESP control is solved. The coupled control system is compared against the decoupled control system through simulation. The simulation results have shown the proposed control perform well.