AbstractBackgroundNovel electrocatalysts with high‐performance, low‐cost, stability, and multifunctional features have been always of interest, for they can boost water splitting efficiency.ResultsHerein, we have first exploited melamine‐derived carbon foam‐supported graphene–CoNi nanocomposites, labeled as CoNi‐NG/MF. Scanning and transmission electron microscopy images demonstrate that CoNi particles are attached to the surfaces of nitrogen‐doped graphene, and graphene nanosheets either encase the backbones or insert in the cavities of foams. Investigation of hydrogen evolution reaction (HER) and oxygen evolution reaction (OER) indicates that CoNi‐NG/MF can afford optimal overpotentials of 246 and 350 mV at a current density of 10 mA cm−2, and their Tafel slopes are 123 and 59 mV dec−1, respectively. Therefore, CoNi‐NG/MF can serve as promising bifunctional electrocatalysts for HER and OER.ConclusionsIn addition, the influence of each component on the HER and OER electrocatalytic performances for CoNi‐NG/MF has been revealed. The synergetic effect between well‐dispersed CoNi particles and nitrogen‐doped graphene nanosheets can create more active sites and improve electrocatalytic activity. Meanwhile, three‐dimensional carbon frameworks inset with plentiful graphene can construct interconnected conductive networks and hierarchical porous structures, promoting electron‐transfer kinetics and enhancing mass‐transfer efficiency. © 2022 Society of Chemical Industry (SCI).