Two-dimensional (2D) membranes exhibit exceptional properties in molecular separation and transport, which reveals their potential use in various applications. However, ion sieving with 2D membranes is severely restrained due to intercalation-induced swelling. Here, we describe how to efficiently stabilize the lamellar architecture using Keggin Al13 polycations as pillars in a Ti3C2Tx membrane. More importantly, interlayer spacing can be easily adjusted with angstrom precision over a wide range (2.7-11.2 Å) to achieve selective and tunable ion sieving. A membrane with narrow d-spacing demonstrated enhanced selectivity for monovalent ions. When applied in a forward osmosis desalination process, this membrane exhibited high NaCl exclusion (99%) with a fast water flux (0.30 L m-2 h-1 bar-1). A membrane with wide d-spacing showed notable selectivity, which was dependent on the cation valence. When it was applied to acid recovery from iron-based industrial wastewater, the membrane showed good H+/Fe2+ selectivity, which makes it a promising substitute for traditional polymeric membranes. Thus, we introduce a possible route to construct 2D membranes with appropriate structures to satisfy different ion-sieving requirements in diverse environment-, resource-, and energy-related applications.