A series of Co/NC samples were fabricated via a facile synthesis. The Co/NC samples possessed 3D macro/mesoporous carbon structure. Methyl red was selected as carbon and nitrogen precursor. The synergy of Co3O4 core and N-graphite shell for Co/NC-800 boosted ORR and OER.