A two-step synthetic strategy has been developed to achieve functionalized nanoporous polymers via the deprotection of the cross-linked polymer precursors containing tert-butyl carboxylate-functionalized stilbene or styrene and N-phenylmaleimide alternating sequences. Three different deprotection methods to generate nanoporosity were examined in this work. The resulting nanoporous polymers showed a significant increase in BET surface area. The effects of cross-linking density and the stiffness of the alternating sequences on the nanoporosity of these polymers were studied. The resulting nanoporous polymers were also investigated as potential CO2 sorbents.