Protecting the dynamics of coupled quantum systems from decoherence by the environment is a key challenge for solid-state quantum information processing1,2. An idle quantum bit (qubit) can be efficiently insulated from the outside world by dynamical decoupling3, as has recently been demonstrated for individual solid-state qubits4,5,6,7,8,9. However, protecting qubit coherence during a multi-qubit gate is a non-trivial problem3,10,11: in general, the decoupling disrupts the interqubit dynamics and hence conflicts with gate operation. This problem is particularly salient for hybrid systems12,13,14,15,16,17,18,19,20,21,22, in which different types of qubit evolve and decohere at very different rates. Here we present the integration of dynamical decoupling into quantum gates for a standard hybrid system, the electron–nuclear spin register. Our design harnesses the internal resonance in the coupled-spin system to resolve the conflict between gate operation and decoupling. We experimentally demonstrate these gates using a two-qubit register in diamond operating at room temperature. Quantum tomography reveals that the qubits involved in the gate operation are protected as accurately as idle qubits. We also perform Grover’s quantum search algorithm1, and achieve fidelities of more than 90% even though the algorithm run-time exceeds the electron spin dephasing time by two orders of magnitude. Our results directly allow decoherence-protected interface gates between different types of solid-state qubit. Ultimately, quantum gates with integrated decoupling may reach the accuracy threshold for fault-tolerant quantum information processing with solid-state devices1,11.