Self-supported electrocatalysts being generated and employed directly as electrodes for energy conversion has been intensively pursued in the fields of materials chemistry and energy. Herein, we report a synthetic strategy to prepare freestanding hierarchically structured, nitrogen-doped nanoporous graphitic carbon membranes functionalized with Janus-type Co/CoP nanocrystals (termed as HNDCM-Co/CoP), which were successfully applied as a highly efficient, binder-free electrode in the hydrogen evolution reaction (HER). Benefited from multiple structural merits, such as a high degree of graphitization, three-dimensionally interconnected micro/meso/macropores, uniform nitrogen doping, well-dispersed Co/CoP nanocrystals, as well as the confinement effect of the thin carbon layer on the nanocrystals, HNDCM-Co/CoP exhibited superior electrocatalytic activity and long-term operation stability for HER under both acidic and alkaline conditions. As a proof-of-concept of practical usage, a 5.6 cm x 4 cm x 60 μm macroscopic piece of HNDCM-Co/CoP was prepared in our laboratory. Driven by a solar cell, electroreduction of water in alkaline conditions (pH 14) was performed, and H2 was produced at a rate of 16 mL/min, demonstrating its potential as real-life energy conversion systems.