Finite-horizon optimal control of input-affine nonlinear systems with fixed final time is considered in this study. It is first shown that the associated Hamilton–Jacobi–Bellman partial differential equation to the problem is reducible to a state-dependent differential Riccati equation after some approximations. With a truncation in the control equation, a near optimal solution to the problem is obtained, and the global onvergence properties of the closed-loop system are analyzed. Afterwards, an approximate method, called Finite-horizon State-Dependent Riccati Equation (Finite-SDRE), is suggested for solving the differential Riccati equation, which renders the origin a locally exponentially stable point. The proposed method provides online feedback solution for controlling different initial conditions. Finally, through some examples, the performance of the resulting controller in finite-horizon control is analyzed. Copyright © 2014 John Wiley & Sons, Ltd.