Hydrogen is a clean fuel that can potentially completely decarbonize the energy supply chain and mitigate global warming. Hydrogen – a highly volatile gas – however, needs to be separated from CO2 during H2 production, and also from cushion gas in H2 geo-storage projects; in addition, large-scale H2 storage is a key obstacle. We thus tested and chemically upgraded common sub-bituminous coal as a material for H2-CO2 separation and H2 storage.The coal adsorbed significant amounts of H2 and CO2 and demonstrated an excellent H2-CO2 separation efficiency if chemically modified. The work presented here thus provides fundamental data required for the economic production and storage of H2, so that an industrial-scale clean and sustainable energy supply can be established.