A novel ferrocene-linked organic-inorganic hybrid porous polymer has been successfully prepared by Friedel-Crafts reaction of octavinylsilsesquioxane and ferrocene. The relationship of structure/property was investigated by FTIR, NMR, XRD, Brunauer-Emmett-Teller (BET) etc. The obtained porous polymer exhibited a high surface area of 1015 m g and a hierarchical pore structure. It could be applied to wastewater treatment with the absorption capacity of up to 1683 mg g for Congo red (CR), 1083 mg g for crystal violet (CV), 1003 mg g for rhodamine B (RB), 441 mg g for methylene blue (MB), 191 mg g for Hg , and 328 mg g for Pb . Remarkably, it could be easily regenerated and the removal efficiency remains almost constant even after six cycles.