Triethylenediamine cobalt complex encapsulated in a metal-organic framework cage to prepare a cobalt single-atom catalyst with a high Co-N4 density for an efficient oxygen reduction reaction.