Membranes with special wettability have attracted increasing interest for oil/water separation. Herein, the cellulose-based nanofibrous membrane was fabricated in an aqueous system by an electrospinning technique. The membrane was then modified successively through coating polydopamine and polyethyleneimine on the surface, which endowed the membrane with superhydrophilic and underwater superoleophobic character. The composition and morphology of the resultant membrane were characterized by attenuated total reflectance Fourier transform infrared spectra, X-ray photoelectron spectroscopy, and field-emission scanning electron microscope, respectively. Surfactant-stabilized oil-in-water emulsions were used to evaluate the separation performance of the membrane at different pH values. It was found that the membrane displayed the excellent antifouling property and separation performance for all different emulsions, with separation efficiency above 99.1% due to the development of a hydration layer underwater on the membrane surface. The reusability study indicated that the modification coating was stable enough to effectively separate emulsions after recycling at least 20 times. The developed nanofibrous membrane, as well as the corresponding modification strategy, enriched the application of membranes with special wettability in the field of oil spills and oily wastewater treatments.