We present the time-dependent restricted-active-space self-consistent-field (TD-RASSCF) theory as a framework for the time-dependent many-electron problem. The theory generalizes the multiconfigurational time-dependent Hartree-Fock (MCTDHF) theory by incorporating the restricted-active-space scheme well known in time-independent quantum chemistry. Optimization of the orbitals as well as the expansion coefficients at each time step makes it possible to construct the wave function accurately while using only a relatively small number of electronic configurations. In numerical calculations of high-order harmonic generation spectra of a one-dimensional model of atomic beryllium interacting with a strong laser pulse, the TD-RASSCF method is reasonably accurate while largely reducing the computational complexity. The TD-RASSCF method has the potential to treat large atoms and molecules beyond the capability of the MCTDHF method.