The development of advanced electrocatalysts for oxygen reduction and evolution is of paramount significance to fuel cells, water splitting, and metal-air batteries. Heteroatom-doped carbon materials have exhibited great promise because of their excellent electrical conductivity, abundance, and superior durability. Rationally optimizing active sites of doped carbons can remarkably enhance their electrocatalytic performance. In this study, nitrogen and oxygen codoped carbon nanotubes were readily synthesized from the pyrolysis of polydopamine-carbon nanotube hybrids. Different electron microscopes, Raman spectra and X-ray photoelectron spectroscopy (XPS) were employed to survey the morphological and componential properties. The newly-obtained catalyst features high-quality nitrogen and oxygen species, favourable porous structures and excellent electric conductivity, and thus exhibits remarkably bifunctional oxygen electrode activity. This research further helps to advance the knowledge of polydopamine and its potential applications as efficient electrocatalysts to replace noble metals.