A gradient carbon-metal hybrid component can be manufactured by thermopyrolysis of metal-organic framework powder. The non-uniformly distributed carbonaceous vapor and uniformly dispersed Co nanoparticles are essential for generating the gradient carbon monolith. This monolith exhibits good mechanical strength and high catalytic activity, and thus can be directly utilized as an electrode for a Mg/H 2 O battery to generate electricity from seawater. The assembled battery shows power density comparable with that of a battery with Pt as the electrode.