We study the dynamics of single-photon absorption by a single emitter coupled to a one-dimensional waveguide that simultaneously provides channels for spontaneous emission (SE) decay and a channel for the input photon. We have developed a time-dependent theory that allows us to specify any input single-photon wavepacket guided by the waveguide as the initial condition, and calculate the excitation probability of the emitter, as well as the time evolution of the transmitted and reflected fields. For single-photon wavepackets with a Gaussian spectrum and temporal shape, we obtain analytical solutions for the dynamics of absorption, with maximum atomic excitation . We furthermore propose a terminated waveguide to aid the single-photon absorption. We found that for an emitter placed at an optimal distance from the termination, the maximum atomic excitation due to an incident single-photon wavepacket can exceed 70%. This high value is a direct consequence of the high SE β-factor for emission into the waveguide. Finally, we have also explored whether waveguide dispersion could aid single-photon absorption by pulse shaping. For a Gaussian input wavepacket, we found that the absorption efficiency can be improved by a further 4% by engineering the dispersion. Efficient single-photon absorption by a single emitter has potential applications in quantum communication and quantum computation.