A novel polyethersulfone (PES) ultrafiltration (UF) membrane, with thermal stability and high permeability, was synthesized using melamine-modified zirconium-based metal-organic framework (MOF), UiO-66-NH2. The surface roughness and textural property of the as-prepared membranes were studied by atomic force microscopy (AFM) and scanning electron microscopy (SEM), respectively. The wettability of the membranes was measured by water contact angle (WCA). Membrane performance was investigated by pure water flux (PWF), flux recovery ratio (FRR), fouling resistance, and antifouling ability. An improvement in the performance of the membrane was observed by introducing the MOF to the PES matrix. A considerable decrease in the WCA and roughness and a notable increase in porosity were found in the modified membranes compared to the bare membrane. By adding the MOF (in the optimal percentage of 0.1 wt%) into the polymer matrix the FRR value was increased from 59.2 to 95.22%. The UF membranes were tested by oily wastewater in different conditions (500 and 300 ppm at 25 and 60 °C). Moreover, the antifouling property of the membranes was found to be greatly improved by the incorporation of the MOFs for long-term filtration.