Membranes with fast and selective ion transport are widely used for water purification and devices for energy conversion and storage including fuel cells, redox flow batteries, and electrochemical reactors.However, it remains challenging to design cost-effective, easily processed ion-conductive membranes with well-defined pore architectures. Here, we report a new approach to designing membranes with narrow molecular-sized channels and hydrophilic functionality that enable fast transport of salt ions and high sizeexclusion selectivity towards small organic molecules. These membranes, based on polymers of intrinsic microporosity (PIMs) containing Tröger's base or amidoxime groups, demonstrate that exquisite control over subnanometer pore structure, the introduction of hydrophilic functional groups, and thickness control all play important roles in achieving fast ion transport combined with high molecular selectivity. These membranes enable aqueous organic flow batteries with high energy efficiency and high capacity retention, suggesting their utility for a variety of energy-related devices and water purification processes.In addition to conventional membrane separation processes 1, 2 , there is a rapidly growing demand for iontransport membranes in applications related to energy 1-3 . With greater reliance on renewable but intermittent energy sources such as solar and wind power, energy conversion and storage technologies are required to integrate low-carbon energy into the power grid. These include electrochemical water splitting and electrolysis for H 2 production 4 , proton-exchange membrane (PEMs) and alkaline fuel cells for energy conversion 5 , electrochemical reduction of CO 2 and N 2 to fuel and chemicals 6 , and scalable redox flow batteries (RFBs) 3,7 . In all of these established and emerging electrochemical processes, ion-selective membranes transport ions whilst isolating the electrochemical reactions in separate cells. In the new generation of RFBs 8-14 , low-cost and high-performance membranes need to have precise selectivity between ions and organic redox-active molecules [15][16][17][18] .Whilst various new electrochemical processes have been developed, the use of expensive commercial ion-exchange membranes, such as the poly(perfluorosulfonic acid) (PFSA)-based Nafion Council through grant agreement number 758370 (ERC-StG-PE5-CoMMaD). Q.S. acknowledges the financial support by Imperial College Department of Chemical Engineering Start-up Fund, seed-funding grant from Institute of Molecular Science and Engineering (IMSE, Imperial College) and seed-funding from EPSRC centres CAM-IES and Energy SuperStore (UK Energy Storage Research Hub). R.T. acknowledges a full PhD scholarship funded by China Scholarship Council. A.W. acknowledges a full PhD scholarship funded by Department of Chemical Engineering at Imperial College. B.P.D. acknowledges the Statoil scholarship. K.E.J. acknowledge the Royal Society University Research Fellowship. A.I.C. and L.C. acknowledge the Leverhulme Trust for supporting the Lev...