Novel Ni–Co-Prussian-blue-analog nanocages consisting of pyramid-like walls were prepared via a facile chemical etching process with ammonia at room temperature. After annealing in air, the derived Ni–Co mixed oxide nanocages exhibit enhanced electrocatalytic activity and excellent stability toward the oxygen-evolution reaction.