Nanostructured polyelectrolyte membranes (PEMs), which are widely used as permselective diffusion barriers in fuel cell technologies and electrochemical processing, are considered as protective membranes suitable for blocking warfare toxins, including water-soluble nerve agents such as sarin. In this article, we examine the mechanisms of sorption and diffusion of sarin in hydrated PEMs by means of atomistic molecular dynamics simulations. Three PEMs are considered: Nafion, sulfonated polystyrene (sPS) that forms the hydrophilic subphase of segregated sPS-polyolefin block copolymers, and random sPS-polyethylene copolymer. We found that sarin concentrates at the interface between the hydrophilic and hydrophobic subphases of hydrated Nafion acting as a surfactant. In hydrated sPS, where the scale of water-polymer segregation is much smaller (1-2 nm), sarin also interacts favorably with hydrophobic and hydrophilic components. Water diffusion slows as the sarin content increases despite the overall increase in solvent content, which suggests that sarin and water have somewhat different pathways through the segregated membrane. Upon replacement of counterions of monovalent potassium with those of divalent calcium, sarin diffusion slows but remains substantial in all ionomers considered, especially at high sarin concentrations. The behavior of sarin is similar to that of its common simulant, dimethyl methylphosphonate.