An optimal guidance algorithm for air-breathing launch vehicle is proposed based on optimal trajectory correction. The optimal trajectory correction problem is a nonlinear optimal feedback control problem with state inequality constraints which results in a nonlinear and nondifferentiable two-point boundary value problem (TPBVP). It is difficult to solve TPBVP on-board. To reduce the on-board calculation cost, the proposed guidance algorithm corrects the reference trajectory in every guidance cycle to satisfy the optimality condition of the optimal feedback control problem. By linearizing the optimality condition, the linear TPBVP is obtained for the optimal trajectory correction. The solution of the linear TPBVP is obtained by solving linear equations through the Simpson rule. Considering the solution of the linear TPBVP as the searching direction for the correction values, the updating step size is generated by linear search. Smooth approximation is applied to the inequality constraints for the nondifferentiable Hamiltonian. The sufficient condition for the global convergence of the algorithm is given in this paper. Finally, simulation results show the effectiveness of the proposed algorithm.