The sustainable production of hydrogen is key to the delivery of clean energy in a hydrogen economy; however, lower-cost alternatives to platinum electrocatalysts are needed. Now, isolated, earth-abundant cobalt atoms dispersed over nitrogen-doped graphene are shown to efficiently electrolyse water to generate hydrogen.