This paper presents a feedback controller designing approach for a large class of finite-time optimal control problems. This approach involves a piecewise truncated variational iteration method (PTVIM) for solving the nonlinear Hamilton–Jacobi–Bellman equation. By using the finite iterations of PTVIM, an analytic approximate solution for value function and suboptimal feedback control law is obtained. Some illustrative examples are employed to demonstrate the accuracy and efficiency of the proposed approach. Copyright © 2013 John Wiley & Sons, Ltd.