By exploiting the hidden algebraic structure of the Schrödinger Hamiltonian, namely the sl(2), we propose a unified approach of generating both exactly solvable and quasi-exactly solvable potentials. We obtain, in this way, two new classes of quasi-exactly solvable systems one of which is of periodic type while the other hyperbolic.