Nitrile groups in the polymer of intrinsic microporosity PIM-1 were modified by base-catalysed hydrolysis, by reaction with ethanolamine and diethanolamine, and by reduction to amine, and the products investigated for their ability to take up a range of dyes from aqueous or ethanolic solution. Hydrolysed products exhibited selectivity for cationic over anionic species, while other products showed the reverse selectivity. At low pH, amine-PIM-1 adsorbed more than its own weight of the anionic dyes Orange II and Acid Red I from aqueous solution. It was demonstrated that adsorbed Orange II can be removed with basic ethanol. Mixtures of oppositely charged dyes undergo precipitation, but selective adsorption of one dye leads to dissolution of the other from the precipitate. Thermal treatment of the chemically modified polymers at 300 °C for 48 h in an inert atmosphere led to structural changes that reduced the dye adsorption capacity. On the basis of a combination of thermogravimetric and elemental analysis with ATR-IR and NMR spectroscopy, feasible structures are suggested for the thermally-treated polymers.