Highly active and stable non-precious metal dual-functional electrocatalysts for the hydrogen evolution reaction (HER) and oxygen evolution reaction (OER) are very important for the industrialization of water electrolysis. Herein, a three-dimensional (3D) porous CoS2/FeS-MOF with adjustable Co/Fe molar ratio are in-stiu grown on a nickel foam (NF) to get a binder-free electrocatalyst electrode for HER and OER (CoS2/[email protected]). It should be emphasized that the MOFs precursor forms abundant heterogeneous interfaces through in-situ sulfidation. Moreover, the open skeleton and ordered porous structure of MOFs will not be destroyed due to the low temperature. The redistribution of electrons at the heterogeneous interfaces will produce more catalytic active centers, providing more active sites for reactant molecules or intermediates, thus availably promoting the electrocatalytic activity of the composite. Therefore, the optimized catalyst CoS2/[email protected] displays high OER activity. The overpotential is only 136 mV at 10 mA cm−2. At the same time, the CoS2/[email protected] also shows good HER catalytic activity. Therefore, the assembled corresponding symmetric electrolyzer CoS2/[email protected]||CoS2/[email protected] achieves a low cell voltage of 1.5 V at 10 mA cm−2 with long time stability for 24 h. This work provides a simple and convenient strategy for the synthesis of transition metal sulfides dual-function electrocatalysts.