This paper researches the ascent trajectory optimization problem in view of multiple constraints that effect on the launch vehicle. First, a series of common constraints that effect on the ascent trajectory are formulated for the trajectory optimization problem. Then, in order to reduce the computational burden on the optimal solution, the restrictions on the angular momentum and the eccentricity of the target orbit are converted into constraints on the terminal altitude, velocity, and flight path angle. In this way, the requirement on accurate orbit insertion can be easily realized by solving a three-parameter optimization problem. Next, an improved particle swarm optimization algorithm is developed based on the Gaussian perturbation method to generate the optimal trajectory. Finally, the algorithm is verified by numerical simulation.