Quantum networks enable a broad range of practical and fundamental applications spanning from distributed quantum computing to sensing and metrology. A cornerstone of such networks is an interface between telecom photons and quantum memories, which has proven challenging for the case of spin-mechanical memories. Here we demonstrate a novel approach based on cavity optomechanics that utilizes the susceptibility of spin qubits to strain. We use it to control electronic spins of nitrogen vacancy centres in diamond with photons in the 1,550 nm telecommunication wavelength band. This method does not involve qubit optical transitions and is insensitive to spectral diffusion. Furthermore, our approach can be applied to solid-state qubits in a wide variety of materials, expanding the toolbox for quantum information processing.