By using the numerically exact density-matrix renormalization group (DMRG) approach, we investigate the ground states of harmonically trapped one-dimensional (1D) fermions with population imbalance and find that the Larkin-Ovchinnikov (LO) state, which is a condensed state of fermion pairs with nonzero center-of-mass momentum, is realized for a wide range of parameters. The phase diagram comprising the two phases of i) an LO state at the trap center and a balanced condensate at the periphery and ii) an LO state at the trap center and a pure majority component at the periphery, is obtained. The reduced two-body density matrix indicates that most of the minority atoms contribute to the LO-type quasi-condensate. With the time-dependent DMRG, we also investigate the real-time dynamics of a system of 1D fermions in response to a spin-flip excitation.