Seamless integration of decoherence protection into quantum logic gates has enabled high-fidelity execution of a quantum algorithm with individual spins in a hybrid quantum system. Qubit decoherence, caused by uncontrolled interactions with the environment, presents a major obstacle to the large-scale implementation of scalable quantum technologies in the solid state. Dynamical decoupling — inducing fast qubit flips to average out unwanted interactions — is a powerful technique that can combat decoherence, but so far, it has been demonstrated mainly for idle qubits. For useful applications, quantum gate operations are also required, which poses a problem for dynamical decoupling that does not distinguish between interactions with the environment and with other qubits. Viatcheslav Dobrovitski and colleagues have overcome this constraint in a prototype hybrid qubit system consisting of an electron spin coupled to a nuclear spin, by precisely adapting time intervals between decoupling pulses. With their approach, they demonstrate that the qubits are protected from decoherence as accurately during gate operation as in their idle states. 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.