Prussian blue PB analogues (K;Mg)xM[Fe(CN)6] were obtained via the co-precipitation method. Manganese, iron, cobalt, nickel, copper and zinc were selected to obtain the metal hexacyanoferrates (MHCFs) of these metals and to systematically study their structural and electrochemical properties as cathode materials. The obtained substances were characterized via X-ray powder analysis, scanning electron microscopy, thermogravimetric analysis and elemental analysis. An electrochemical study of the obtained cathode materials relative to a platinum anode in an aqueous medium and a magnesium anode in a nonaqueous medium was carried out, and the cycling parameters were determined. The influence of 3d-metal nature on the composition–structure–properties of hexacyanoferrates was demonstrated. MHCFs are promising cathode materials for Mg2+ intercalation/deintercalation in aqueous electrolytes.