Aiming at the problem of multiple constraints and low solving efficiency in the process of vehicle path tracking, an improved hp-adaptive Radau pseudospectral method (I-hp-ARPM) which uses a double-layer optimization iteration strategy and the residual of differential algebraic constraints at sampling points with a Gaussian distribution as the error evaluation criterion is proposed. Firstly, a four-DOF vehicle motion model is established. Secondly, on the basis of establishing algebraic differential constraints and path constraints and satisfying the optimization objective function, the I-hp-ARPM is used to transform the optimal control problem (OCP) into a general nonlinear programming problem for solution. Finally, the effectiveness of the proposed method is verified compared with the traditional hp-adaptive pseudospectral method. The simulation results and the virtual test show that there are peak values at 3.5 s and 4.8 s, as well as 6 s, for both the steering wheel angle and the sideslip angle with the condition of μ = 0.8. And also, there are peak values at the times of 3.5 s and 5.5 s, as well as 7.5 s, with the condition of μ = 0.4. This indicates the vehicle can track the reference path well with the control of the proposed algorithm. Both the initial and final constraints, as well as the path constraint, meet the requirements. The proposed method can generate the optimal trajectory that meets various constraint requirements. This method provides a design basis for path tracking of autonomous vehicles and has significance in engineering.