One model for quantum networks1,2 is based on the probabilistic measurement of two photons, each entangled with a distant node, e.g., an atom or atomic ensemble3-7. A second, deterministic model transfers information directly from an atom onto a cavity photon, which carries it to a second node8, as recently demonstrated with neutral atoms9. In both cases, the challenge is to transfer information efficiently while preserving coherence. Here, following the second scheme, we map the quantum state of an ion onto a photon within an optical cavity. Using an ion enables deterministic state initialization10,11, while the cavity provides coherent coupling to a well-defined output mode12-15. Although it is often assumed that a cavity-based quantum interface requires the strong-coupling regime, we show transfer fidelities of 92% in the presence of non-negligible decoherence and characterize the interplay between fidelity and efficiency. Our time-independent mapping process offers a promising route toward ion-based quantum networks.