DFT study highlights the impact of benzimidazole-linked polymer structure design and explain the molecular and electronic structure, investigate the interaction sites and elucidate the experimental results on carbon dioxide and nitrogen sorption on these porous structures. Affinity of gases on porous adsorbents is important for establishing an understanding of effective CO2 adsorption and design target specific sorbents. Obtained results shed light on the CO2 and N2 affinity and selectivity during the adsorption process.