A series of porous hypercrosslinked polymers (HCP-x) were synthesized from waste polystyrene foam via Fridel-Crafts alkylation reaction, aiming to optimize the utilization of waste plastics. The impact of various crosslinkers on the structural characteristics and CO2 adsorption properties of HCP-x was investigated. The results indicated that HCP-x polymers possess high specific surface areas spanning 830–1182 m2 g−1, abundant narrow micropores, and exceptional thermal stability. Notably, HCP-2 exhibited the highest CO2 adsorption capacity of 2.77 mmol g−1 at 273 K and 1.0 bar. These hypercrosslinked polymers also demonstrated a favorable CO2/N2 ideal selectivity and robust cyclic adsorption performance. Breakthrough experiments confirmed the selective adsorption of CO2 from simulated flue gas containing CO2/N2 (15/85). Additionally, the mechanism underlying CO2 adsorption on HCP-x was elucidated by analyzing adsorption thermodynamics and diffusion kinetics. This study not only introduces an innovative method for recycling waste polystyrene foam but also underscores the potential of HCP-x as an effective adsorbent for CO2 capture.