We present a scheme to drive a finite-dimensional quantum system into the decoherence-free subspaces(DFS) by Lyapunov control. Control fields are established by Lyapunov function. This proposal works well for both closed and open quantum systems, with replacing the DFS by desired subspaces for closed systems. An example which consists of a four-level system with three degenerate states driven by three lasers is presented to gain further insight of the scheme, numerical simulations for the dynamics of the system are performed and the results are good.