One dimensional iron oxide–polyaniline core–shell nanostructures enable faster adsorption of dyes and separation of the adsorbent using an external magnet.