On the way towards a sustainable low-carbon future, the design and construction of chemical or physical adsorbents for CO(2) capture and clean energy storage are vital technology. The incorporation of accessible nitrogen-donor sites into the pore walls of porous adsorbents can dramatically affect the CO(2) uptake capacity and selectivity on account of the dipole-quadrupole interactions between the polarizable CO(2) molecule and the accessible nitrogen site. In the present work, a nitrogen-rich rth-type metal-organic framework (MOF) was constructed based on rational design and careful synthesis. The MOF presents exceptionally high uptake capacity not only for CO(2) but also for H(2), which is attributed to favorable interactions between the gas molecules and the nitrogen-rich triazole units of the MOF proved by both experimental measurements and theoretical molecular simulations.