The polymer of intrinsic microporosity PIM-1 was modified by reaction with ethanolamine and with diethanolamine, and the modified polymers characterized by infrared spectroscopy, solid-state NMR spectroscopy, elemental analysis, thermogravimetric analysis and nitrogen adsorption. Various possible reaction products were considered, and the results indicated that hydroxyalkylaminoalkylamide structures were obtained. Gas adsorption measurements showed that ethanolamine modification increased the ideal CO2/N2 selectivity. Studies of dye adsorption from aqueous solution demonstrated that the reaction products showed strong selectivity for the anionic dye Orange II, compared to the cationic dye Safranin O. Mass uptakes of the anionic dye by ethanolamine-modified PIM-1 samples were up to 2 orders of magnitude higher than for the parent polymer.