Experimental realization of a universal set of quantum logic gates is the central requirement for the implementation of a quantum computer. In an ‘all-geometric’ approach to quantum computation1, 2, the quantum gates are implemented using Berry phases3 and their non-Abelian extensions, holonomies4, from geometric transformation of quantum states in the Hilbert space5. Apart from its fundamental interest and rich mathematical structure, the geometric approach has some built-in noise-resilience features1, 2, 6, 7. On the experimental side, geometric phases and holonomies have been observed in thermal ensembles of liquid molecules using nuclear magnetic resonance8, 9; however, such systems are known to be non-scalable for the purposes of quantum computing10. There are proposals to implement geometric quantum computation in scalable experimental platforms such as trapped ions11, superconducting quantum bits12 and quantum dots13, and a recent experiment has realized geometric single-bit gates in a superconducting system14. Here we report the experimental realization of a universal set of geometric quantum gates using the solid-state spins of diamond nitrogen–vacancy centres. These diamond defects provide a scalable experimental platform15, 16, 17with the potential for room-temperature quantum computing16, 17, 18, 19, which has attracted strong interest in recent years20. Our experiment shows that all-geometric and potentially robust quantum computation can be realized with solid-state spin quantum bits, making use of recent advances in the coherent control of this system15, 16, 17, 18, 19, 20.