Coherent interactions at a distance provide a powerful tool for quantum simulation and computation. The most common approach to realize an effective long-distance coupling on-chip' is to use a quantum mediator, as has been demonstrated for superconducting qubits and trapped ions. For quantum dot arrays, which combine a high degree of tunability with extremely long coherence times, the experimental demonstration of the time evolution of coherent spin-spin coupling via an intermediary system remains an important outstanding goal. Here, we use a linear triple-quantum-dot array to demonstrate a coherent time evolution of two interacting distant spins via a quantum mediator. The two outer dots are occupied with a single electron spin each, and the spins experience a superexchange interaction through the empty middle dot, which acts as mediator. Using single-shot spin readout, we measure the coherent time evolution of the spin states on the outer dots and observe a characteristic dependence of the exchange frequency as a function of the detuning between the middle and outer dots. This approach may provide a new route for scaling up spin qubit circuits using quantum dots, and aid in the simulation of materials and molecules with non-nearest-neighbour couplings such as MnO (ref. 27), high-temperature superconductors and DNA. The same superexchange concept can also be applied in cold atom experiments.