We propose a synthetic strategy to synthesize cobalt nanoparticle cores encapsulated in tunable N-doped graphene shells on N-doped reduced graphene oxide as a highly efficient and stable pH-universal electrocatalyst. The superior performance is mainly attributed to the optimization of the electrocatalytic centre and the improvement of the electronic configuration.