Membrane-based separation of combined acid gases carbon dioxide and hydrogen sulfide from natural gas streams has attracted increasing academic and commercial interest. These feeds are referred to as “sour,” and herein, we report an ultra H2S-selective and exceptionally permeable glassy amidoxime-functionalized polymer of intrinsic microporosity for membrane-based separation. A ternary feed mixture (with 20% H2S:20% CO2:60% CH4) was used to demonstrate that a glassy amidoxime-functionalized membrane provides unprecedented separation performance under challenging feed pressures up to 77 bar. These membranes show extraordinary H2S/CH4 selectivity up to 75 with ultrahigh H2S permeability >4000 Barrers, two to three orders of magnitude higher than commercially available glassy polymeric membranes. We demonstrate that the postsynthesis functionalization of hyper-rigid polymers with appropriate functional polar groups provides a unique design strategy for achieving ultraselective and highly permeable membrane materials for practical natural gas sweetening and additional challenging gas pair separations.