Dynamical electronic-and vibrational-structure theories have received a growing interest in the last years due to their ability to simulate spectra recorded with ultrafast experimental techniques. The exact time evolution of a molecular system can, in principle, be obtained from the time-dependent version of full configuration interaction.Such an approach is, however, limited to few-atom systems due to the exponential increase of its cost with the system dimension. In the present work, we overcome this unfavorable scaling by employing the time-dependent density matrix renormalization group (TD-DMRG) which parametrizes the time-dependent wavefunction as a matrix product state. The time-dependent Schrödinger equation is then integrated with a sweep-based algorithm, as in standard time-independent DMRG. Unlike other TD-DMRG approaches, the one presented here leads to a set of coupled equations that can be integrated exactly. The resulting theory enables us to study real-and imaginarytime evolutions of Hamiltonians comprising more than 20 degrees of freedom that are challenging for current state-of-the-art quantum dynamics algorithms. We apply our algorithm to the simulation of quantum dynamics of models of increasing complexity, ranging from simple excitonic Hamiltonians to more complex ab-initio vibronic ones.