A new metalloporphyrin-based conjugated microporous polymer, NiP-CMP, was constructed via a homo-coupling polymerization reaction. NiP-CMP possesses a high BET surface area of over 2600 m(2) g(-1), a large pore volume of 2.288 cm(3) g(-1), good stability, and displays excellent guest uptake of 202 wt% in iodine vapour. We also highlight that the polymer exhibits outstanding performance for the reversible adsorption of iodine in solution.