A pyrene-based benzimidazole-linked polymer (BILP-10) has been synthesized by the co-condensation of 1,3,6,8-tetrakis(4-formylphenyl)pyrene and 1,2,4,5-benzenetetramine tetrahydrochloride in dimethylformamide. The use of pyrene as a molecular building unit leads to the formation of self-assembled nanofibers that have moderate surface area (SA(BET) = 787 m(2) g(-1)) and very high CO2/N-2 (128) and CO2/CH4 (18) selectivities at 273 K. Furthermore, results from gas uptake measurements indicate that BILP-10 can store significant amounts of CO2 (4.0 mmol at 273 K/1.0 bar) and H-2 (1.6 wt% at 77 K/1.0 bar) with respective isosteric heats of adsorption of 38.2 and 9.3 kJ mol(-1) which exceed all of the previously reported values for BILPs and are among the highest values reported to date for unmodified porous organic polymers. Under high pressure settings, BILP-10 displays moderate uptakes of H-2 (27.3 g L-1, 77 K/40 bar), CH4 (72 L L-1, 298 K/40 bar), and CO2 (13.3 mmol g(-1), 298 K/40 bar). The unusually high CO2 and H-2 binding affinities of BILP-10 are presumably facilitated by the amphoteric pore walls of the polymer that contain imidazole moieties and the predominant microporous nature.