Redox-active materials with high electron and ion conductivities are required for the new generation of metal-ion batteries (MIBs) with high energy density and high rate capability. Recently, a novel family of conductive (>1 S/cm) and electrochemically active metal organic frameworks (MOFs) composed of aryl amine ligands and bivalent transition metal ions (Cu2+, Ni2+, Co2+) has been reported. However, this class of MOFs remains virtually unexplored in metal-ion batteries. In particular, the only structures tested in MIBs are based on hexaaminobenzene, a molecule that readily decomposes or gets oxidized during synthesis or while handling, which limits its applicability. Here we report new Ni(II) and Cu(II) coordination polymers derived from commercially available or easily synthesizable polyamines, e.g. 1,2,4,5-tetraaminobenzene tetrahydrochloride (TAB*4HCl), etc. A series of target MOFs was synthesized by simply mixing the ligand and the transition metal salt in the presence of air and ammonia. The novel materials are characterized using a set of complementary techniques including solid-state NMR, elemental analysis, IR spectroscopy, X-ray diffraction, X-ray photoelectron spectroscopy (XPS) and electron microscopy. Their electrochemical behavior is rationalized using impedance spectroscopy monitoring and ex situ XPS. The obtained MOFs were successfully applied as both cathode and anode materials in lithium- and sodium-ion batteries and demonstrated ultra-high rate capability and stability. For example, a specific capacity of 83 mAh/g can be reached for the Ni(II) polymer derived from TAB*4HCl at 20 A/g current rate (>250 C) in 0.8-2.0 V vs. Li/Li+ range, while 79% of this capacity is retained after 20000 cycles. Another example is the Cu-TAB coordination polymer, which shows a specific capacity up to 262 mAh/g in 1.5-4.1 V vs. Li/Li+ range, which corresponds to the energy density of 616 Wh/kg. The revealed correlations between the molecular structures of MOFs, their physicochemical properties and electrochemical performance pave a way to rational design of new coordination polymers for advanced metal-ion batteries.