Quantum Lyapunov control was developed in order to transform a quantum system from arbitrary initial states to a target state. The idea is to find control fields that steer the Lyapunov function to zero as t → ∞, meanwhile the quantum system is driven to the target state. In order to shorten the time required to reach the target state, we propose two designs to optimize Lyapunov control in this paper. The first design makes the Lyapunov function decrease as fast as possible with a constraint on the total power of control fields, and the second design has the same purpose but with a constraint on each control field. Examples of a three-level system demonstrate that the evolution time for Lyapunov control can be significantly shortened, especially when high control fidelity is required. Besides, this optimal Lyapunov-based quantum control is robust against uncertainties in the free Hamiltonian and decoherence in the system compared to conventional Lyapunov control. We apply our optimal design to cool a nanomechanical resonator, a shorter cooling time is found with respect to the cooling time by the conventional Lyapunov design.