The mechanism of electrochemical hydrogen storage in a nanostructured carbon electrode using the electrodecomposition of KOH and H2SO4 aqueous solutions has been investigated by means of galvanostatic and voltammetry techniques. The role of charging the electrical double layer is carefully considered during the process of hydrogen insertion and deinsertion into carbon, i.e. electroreduction and electrooxidation, respectively. Once the electrode potential becomes lower than the equilibrium potential, hydrogen in the zero oxidation state is formed by the reduction of water in alkaline solution or the reduction of hydronium ions H3O+ in acidic medium. In the next step, hydrogen is physically adsorbed (Had) onto the carbon surface and diffuses into the bulk of the carbon material with an efficiency which depends on the type of electrolyte. A higher amount of hydrogen is stored using the KOH medium, and the galvanostatic oxidation shows a well-defined plateau around -0.5 V vs. Normal Hydrogen Electrode (NHE). Due to the high overvoltage value in KOH (η=0.55 V), the recombination steps of Had leading to molecular hydrogen evolution through the chemical (Tafel) or electrochemical (Heyrovsky) reactions are less favoured than in an H2SO4 medium (η=0.32 V). Hence, a meaningful sorption of hydrogen is observed only in the basic electrolyte which shows a reversible capacity of 350 mA h/g (i.e. 1.3 wt. %) with a good electrical efficiency. Such performance demonstrates that nanostructured activated carbons might be a promising alternative to metallic alloys for electrochemical hydrogen storage.