Quantum state transfer is a key operation for quantum information processing. The original pitch-and-catch protocols rely on flying qubits or single photons with engineered wavepacket shapes to achieve a deterministic, fast and high-fidelity transfer. Yet, these protocols overlook two important factors, namely, the distortion of the wavepacket during the propagation and non-Markovian effects during the emission and reabsorption processes due to time-dependent controls. Here we address both difficulties in a general quantum-optical model and propose a correction strategy to improve quantum state transfer protocols. Including non-Markovian effects in our theoretical description, we show how to derive control pulses that imprint phases on the wavepacket that compensate the distortion caused by propagation. Our theoretical results are supported by detailed numerical simulations showing that a suitable correction strategy can improve state transfer fidelities up to three orders of magnitude.