Emulsified oils and organic dyes as contaminants are widely distributed in generated wastewater from printing and dyeing industry, posing threats to the ecological environment and human health. Recently, filter membranes with hydrophilic separation layers have been broadly developed for oil-water separation. However, the frequent membrane fouling and exposure to acidic/alkaline environments significantly deteriorate the separation performance of membrane. Here, a stable membrane based on polyaniline is presented for high-efficient removal of emulsified oils and dyes from wastewater. Commercial hydrophobic microfiltration membrane was modified by poly(vinyl alcohol-co-ethylene) to increase the 3,3'-diaminobenzidine adsorption for in-situ polymerization. By polymerization to form hydrophilic polyaniline layers and reacting with polyvinyl pyrrolidone, the as-prepared membranes exhibit hydrophilicity and underwater superoleophobicity, and high-efficient treatments for oil-inwater emulsions and dye solutions. Even after multi-cycle separation, continuous separation for 60 min, or immersing into 20 wt% HCl /10 wt% NaOH solution for 14 days, the treated membranes still maintain high separation efficiencies and relatively stable fluxes for oil-in-water emulsions and dye solutions, showing excellent antifouling and acid/alkali-resistant performances. This study provides a promising guidance for high-efficient removal of emulsified oils and dyes from wastewater in harsh conditions.