Nitrogen-doped hollow carbon spheres with a wrinkled surface were synthesized through direct pyrolysis of core–shell structured graphene oxide–resol@melamine formaldehyde composites.