A central aim of quantum information processing is the efficient entanglement of multiple stationary quantum memories via photons. Among solid-state systems, the nitrogen-vacancy centre in diamond has emerged as an excellent optically addressable memory with second-scale electron spin coherence times. Recently, quantum entanglement and teleportation have been shown between two nitrogen-vacancy memories, but scaling to larger networks requires more efficient spin-photon interfaces such as optical resonators.Here we report such nitrogen-vacancy-nanocavity systems in the strong Purcell regime with optical quality factors approaching 10,000 and electron spin coherence times exceeding 200 ms using a silicon hard-mask fabrication process. This spin-photon interface is integrated with on-chip microwave striplines for coherent spin control, providing an efficient quantum memory for quantum networks.