Side-chain cobaltocenium-containing block copolymers are prepared by ring-opening metathesis polymerization (ROMP). These block copolymers include one cobaltocenium-containing block, with the second block being either a nonmetal-containing segment or a cobaltocenium-containing segment with different counterions. These block copolymers are self-assembled into spherical core/shell micelles in solutions. A template strategy is used to prepare cobalt (II or III)-containing nanoparticles by treating the self-assembled micelles via UV/ozonolysis and pyrolysis. Characterization by X-ray photon spectroscopy and X-ray diffraction indicates that these nanoparticles consist of different oxidants of cobalt, depending on the chemical compositions of block copolymers.