Macroscopic mechanical oscillators have been coaxed into a regime of quantum behaviour by direct refrigeration1or a combination of refrigeration and laser-like cooling2,3. This result supports the idea that mechanical oscillators may perform useful functions in the processing of quantum information with superconducting circuits4,5,6,7, either by serving as a quantum memory for the ephemeral state of a microwave field or by providing a quantum interface between otherwise incompatible systems8,9,10,11,12,13,14. As yet, the transfer of an itinerant state or a propagating mode of a microwave field to and from a storage medium has not been demonstrated, owing to the inability to turn on and off the interaction between the microwave field and the medium sufficiently quickly. Here we demonstrate that the state of an itinerant microwave field can be coherently transferred into, stored in and retrieved from a mechanical oscillator with amplitudes at the single-quantum level. Crucially, the time to capture and to retrieve the microwave state is shorter than the quantum state lifetime of the mechanical oscillator. In this quantum regime, the mechanical oscillator can both store quantum information and enable its transfer between otherwise incompatible systems.