Desalination of oil-contaminated saline water using membrane distillation requires hydrophobic membranes with underwater superoleophobic surfaces. For designing such membranes, the chemistry and morphology of the interfacial domains in contact with the contaminated water need to be adjusted such that a stable water layer, adhering to the surface, prevents oil droplets from wetting the membrane. In this article, we present an approach that relies on the controlled functionalization of the surface of polyvinylidene fluoride (PVDF) membranes; we adjust the surface topography of the membranes and introduce chemical heterogeneity to them. We show that the morphology of the PVDF surface can be altered by adjusting the composition of the nonsolvent bath used for the phase inversion process. Also, we render the surface of the membranes hydrophilic by using an alkaline chemical bath solution. The membrane morphology and effectiveness of our chemical treatment were confirmed by atomic force microscopy (AFM), X-ray photoelectron spectroscopy (XPS), Fourier-transformed infrared spectroscopy (FTIR), and zeta potential measurements. A stable underwater contact angle, higher than 150°, was observed for both canola oil (ρ ≈ 0.913 g cm-3, γ ≈ 31.5 mN m-1) and hexane (ρ ≈ 0.655 g cm-3, γ ≈ 18 mN m-1). We evaluated the performance of both pristine and functionalized membranes in a laboratory-scale direct contact membrane distillation (DCMD) setup and desalinated a saline solution contaminated with 500 ppm canola oil. Our results show that oil does not wet the functionalized membrane during the desalination process. The average permeate flux and salt rejection values for the functionalized membranes were 45 ± 5 Lm-2h-1 ( Tfeed = 70 °C, Tdistillate = 20 °C) and 99.99%, respectively.