This paper presents a numerical method based on quasilinearization and rationalized Haar functions for solving nonlinear optimal control problems including terminal state constraints, state and control inequality constraints. The optimal control problem is converted into a sequence of quadratic programming problems. The rationalized Haar functions with unknown coefficients are used to approximate the control variables and the derivative of the state variables. By adding artificial controls, the number of state and control variables is equal. Then the quasilinearization method is used to change the nonlinear optimal control problems with a sequence of constrained linear-quadratic optimal control problems. To show the effectiveness of the proposed method, the simulation results of two constrained nonlinear optimal control problems are presented.