In this paper, a Hamilton-Jacobi-Bellman (HJB) equation based optimal control algorithm for robust controller design, is proposed for a nonlinear system. Utilizing the Lyapunov direct method, controller is shown to be optimal with respect to a cost functional that includes maximum bound on system uncertainty. Controller is continuous and requires the knowledge of the upper bound of system uncertainty. In the proposed algorithm, Neural Network (NN) is used to find approximate solution of HJB equation. Proposed algorithm has been applied on a nonlinear uncertain system. © 2009 IEEE.