Copolymer consisting of acrylonitrile (AN) and acrylic acid (AA) segments with different molar ratios were synthesized via a mixed-solvent precipitation polymerization method. The prepared polymer was then applied to fabricate nanofiber membrane via electrospinning technique. It was found that when the molar ratio of AN/AA was 80/20, the resultant membrane presented outstanding hydrophilicity with a water contact angle of 0° and water adsorption ratio of 17.10. In addition, the breaking force of optimized membrane was increased by more than 60% when comparing with those of pure PAN homopolymer counterpart due to the hydrogen bonding interaction resulting from the carboxyl groups in AA chain segments. The developed membrane possessed fascinating underwater oleophobicity with oil contact angle over 150° and could effectively separate oil/water mixture and oil-in-water emulsion with excellent separation efficiency beyond 95%, ascribing to the hydration layer on the membrane surface and size-sieving effect arising from the multi-scale pore size in the material. The current study provides a novel insight into the fabrication of hydrophilic membrane for oily wastewater treatment for practical applications.