Herein, both surface chemistry engineering and pore partition strategies were adopted to regulate the pore environments of the hyper-crosslinked polymers (HCPs) to strengthen their aniline adsorption from water. Specifically, plentiful carboxyl groups were first anchored on the macropores of polystyrene through the nucleophilic substitution, and then abundant rigid methylene partitioned the macropores of polystyrene into abundant micropores/mesopores through the Friedel−Crafts alkylation. As a result, carboxyl-functionalized HCPs were accurately prepared as planned. PS-BTCA-HCP-4 exhibited the highest adsorption to aniline, boasting the q max of 396 mg/g, which can be largely attributed to its highest S BET of 478.0 m 2 /g and the rich carboxyl groups with the oxygen content of 11.31%. Furthermore, it achieved adsorption equilibrium within 70 min, and its deliberately hierarchical porosity consisting of plentiful micropores/mesopores made a positive contribution.