Acid gases carbon dioxide (CO2) and hydrogen sulfide (H2S) are important and highly undesirable contaminants in natural gas, and membrane-based removal of these contaminants is environmentally attractive. Although removal of CO2 from natural gas using membranes is well established in industry, there is limited research on H2S removal, mainly due to its toxic nature. In actual field operations, wellhead pressures can exceed 50 bar with H2S concentrations up to 20%. Membrane plasticization and competitive mixed-gas sorption, which can both lead to a loss of separation efficiency, are likely to occur under these aggressive feed conditions, and this is almost always accompanied by a significant decrease in membrane selectivity. In this paper, permeation and separation properties of a hydroxyl-functionalized polymer with intrinsic microporosity (PIM-6FDA-OH) are reported for mixed-gas feeds containing CO2, H2S or the combined pair with CH4. The pure-gas permeation results show no H2S-induced plasticization of the PIM-6FDA-OH film in a pure H2S feed at 35 °C up to 4.5 bar, and revealed only a slight plasticization up to 8 bar of pure H2S. The hydroxyl-functionalized PIM membrane exhibited a significant pure-gas CO2 plasticization resistance up to 28 bar feed pressure. Mixed-gas (15% H2S/15% CO2/70% CH4) permeation results showed that the hydroxyl-functionalized PIM membrane maintained excellent separation performance even under exceedingly challenging feed conditions. The CO2 and H2S permeability isotherms indicated minimal CO2-induced plasticization; however, H2S-induced plasticization effects were evident at the highest mixed gas feed pressure of 48 bar. Under this extremely aggressive mixed gas feed, the binary CO2/CH4 and H2S/CH4 permselectivities, and the combined CO2 and H2S acid gas selectivity were 25, 30 and 55, respectively. Our results indicate that OH-functionalized PIM materials are very promising candidate membrane materials for simultaneous removal of CO2 and H2S from aggressive natural gas feeds, which makes membrane-based gas separation technology an attractive option for clean energy production and reducing greenhouse gas emissions.