With the load of urban traffic system becomes more serious, the Automatic Parking System (APS) plays an important role in alleviating the burden of drivers and improving vehicle safety. The APS is consisted of environmental perception, path planning and path following. The path following controls the lateral movement of vehicle during the parking process, and requires the trajectory tracking error to be as small as possible. At present, some control algorithms are used including PID control, pure pursuit control, etc. However, these algorithms relying heavily on parameters and environment, have some problems such as slow response and low precision. To solve this problem, a path following control method based on Model Predictive Control (MPC) algorithm is proposed in this paper. Firstly, Kinematic vehicle model and path tracker based on MPC algorithm are built. Secondly, a test bench that composed of CANoe hardware in the loop (HIL) system and steering wheel system is built. According to the result of path planning, the HIL system based on MPC algorithm generates a real-time target steering angle, and sends it to the steering wheel. The steering wheel system is a column electric power steering system, which completes the steering wheel angle control and sends the steering wheel actual angle to the vehicle dynamic model of HIL system, forming the vehicle real-time motion trajectory. Thirdly, a comparison experiment with pure pursuit tracking control algorithm is carried out, and the results indicate that the designed MPC algorithms has excellent robustness and can minimize the tracking error.