Post-combustion CO 2 capture and air separation are integral parts of the energy industry, although the available technologies remain inefficient, resulting in costly energy penalties. Here we report azo-bridged, nitrogen-rich, aromatic, water stable, nanoporous covalent organic polymers, which can be synthesized by catalyst-free direct coupling of aromatic nitro and amine moieties under basic conditions. Unlike other porous materials, azo-covalent organic polymers exhibit an unprecedented increase in CO 2 /N 2 selectivity with increasing temperature, reaching the highest value (288 at 323 K) reported to date. Here we observe that azo groups reject N 2 , thus making the framework N 2 -phobic. Monte Carlo simulations suggest that the origin of the N 2 phobicity of the azo-group is the entropic loss of N 2 gas molecules upon binding, although the adsorption is enthalpically favourable. Any gas separations that require the efficient exclusion of N 2 gas would do well to employ azo units in the sorbent chemistry.