Rationally designing metal organic frameworks (MOFs) as an ideal dual-function material for water electrolysis and supercapacitors is of great significance for energy storage and conversion. Herein, we successfully synthesized the nanoneedle-like structure CoNi-MOF by partially replacing 2, 5-thiophenedicarboxylic acid (TDA) with 1, 1′-Ferrocenedicarboxylate (Fc). The exchange of Fc ligand can modulate the morphology and electronic structure of CoNi-TDA, thus exposing the abundant active sites and improving the electrical conductivity. The as-prepared CoNi-TDA/0.2Fc exhibited a low overpotential of 236 mV at 10 mA cm−2 for oxygen evolution reaction (OER) and a low Tafel slope of 40.44 mV dec−1. Additionally, CoNi-TDA/0.2Fc demonstrated a notable specific capacitance of 1409 F g−1 at 1 A/g and excellent stability, maintaining a capacitance retention of 96.54 % after 20,000 cycles. The study proposes a new strategy to modulate the morphology and electronic structure of MOFs via the ligand exchange for high-performance energy storage and conversion device.