Extracting the Gibbs free energy from natural water salination, a.k.a. the blue energy, has attracted a long-standing, global interest. While pressure-retarded osmosis (PRO) and reverse electrodialysis (RED) are by far the most studied methods for such a purpose, the concept of using the capacitive electrode response for blue energy harvesting has been shown to offer unique advantages. Despite that porous electrodes are predominately used in capacitive methods, the role of pore properties in energy extraction remains unclear. Here we show that the distribution of the nano-sized pores in an electrode imposes a profound impact on the electrode capacitive response under a salinity gradient. Such a pore-size effect can be sufficiently strong that leads to structural changes of the electric double layer, resulting in highly efficient extraction of the Gibbs free energy. We demonstrate that a device fabricated with carbon electrodes with significantly different nanopore distributions can generate a high power density without membranes or an external charge source.