Two promising architectures for solid-state quantum information processing are based on electron spins electrostatically confined in semiconductor quantum dots and the collective electrodynamic modes of superconducting circuits. Superconducting electrodynamic qubits involve macroscopic numbers of electrons and offer the advantage of larger coupling, whereas semiconductor spin qubits involve individual electrons trapped in microscopic volumes but are more difficult to link. We combined beneficial aspects of both platforms in the Andreev spin qubit: the spin degree of freedom of an electronic quasiparticle trapped in the supercurrent-carrying Andreev levels of a Josephson semiconductor nanowire. We performed coherent spin manipulation by combining single-shot circuit–quantum-electrodynamics readout and spin-flipping Raman transitions and found a spin-flip time TS = 17 microseconds and a spin coherence time T2E = 52 nanoseconds. These results herald a regime of supercurrent-mediated coherent spin-photon coupling at the single-quantum level.