We consider infinite-horizon optimal control problems. The main idea is to convert the problem into an equivalent finite-horizon nonlinear optimal control problem. The resulting problem is then solved by means of a direct method using Haar wavelets. A local property of Haar wavelets is applied to simplify the calculation process. The accuracy of the present method is demonstrated by two illustrative examples.