In this paper, the optimal control problems (OCPs) are converted into a constrained optimization problem based on state parameterization via the Bspline functions (BSFs). In fact, the state variable can be considered as a series of the BSFs with unknown coefficients, and the OCPs are transformed into a constrained optimization problem. With the proposed method, the control and state variables also the performance index can be obtained approximately. Also, the convergence theorem of the presented approach is proved in details, some illustrative examples are reported. Also, an example, which has analytic noncontinuous state and control variable, is presented to show the efficiency and reliability of the purposed method, compared with other existing methods.