Despite the significant advances in preparing carbon-metal oxide composite electrodes, strategies for seamless interconnecting of these two materials without using binders are still scarce. Herein we design a novel method for in situ synthesis of porous 2D-layered carbon–metal oxide composite electrode. Firstly, 2D-layered Ni-Co mixed metal-organic frameworks (MOFs) are deposited directly on nickel foam by anodic electrodeposition. Subsequent pyrolysis and activation procedure lead to the formation of carbon–metal oxides composite electrodes. Even with an ultrahigh mass loading of 13.4mgcm−2, the as-prepared electrodes exhibit a superior rate performance of 93% (from 1 to 20mAcm−2), high capacitance (2098mFcm−2 at a current density of 1mAcm−2), low resistance and excellent cycling stability, making them promising candidates for practical supercapacitor application. As a proof of concept, several MOF derived electrodes with different metal sources have also been prepared successfully via the same route, demonstrating the versatility of the proposed method for the preparation of binder-free carbon–metal oxide composite electrodes for electrochemical devices.