This work prepares novel polyacrylonitrile (PAN) membranes by incorporating eggplant waste (EGW) as eco-friendly green nanoparticles (NPs) with PAN membranes to enhance the antifouling of PAN membranes to separate oil from oily wastewater (OWW). The modified PAN membranes are characterized by Fourier transform infrared spectroscopy (FTIR), field emission scanning electron microscope (FE-SEM), and measurements of the contact angle, porosity, and mechanical properties. The effect of EGW NPs content on membrane properties and morphology, its entire performance, and its antifouling characteristics is investigated. The performance of the PAN-EGW membranes is evaluated by pure water flux and oil rejection. The PAN membrane incorporated with 0.1 wt% EGW NPs enhances a pure water flux to 204.71 L/m2 h, exceeding that of the pristine PAN membrane (136.51 L/m2 h). This can be attributed to the low contact angle (39.66◦), high surface membrane porosity (91%), and good tensile strength (8.2 MPa) for PAN-EGW membranes compared to the contact angle (68.56◦), surface membrane porosity (69%), and tensile strength (5.1 MPa) for the pristine PAN membrane. Another significant improvement noticed is the excellent oil rejection by the modified membranes (about 99.95%, 95.50%, and 90.00% at oil concentrations of 1000, 100, and 10 ppm, respectively, and a transmembrane pressure (TMP) of 2 bar); treated-wastewater oil content that complies with the World Health Organization (WHO) environmental discharge standards (< 5 ppm) is achieved. Also, the antifouling performance is improved; a higher flux recovery ratio (FRR) is obtained (about 94.43%). In addition, the oil separation efficiency remains stable with a minor decrease in permeate flux after four cycles. This study demonstrates that the novel PAN-EGW membranes have great promise and potential for purifying OWW, particularly at low oil concentrations (10 ppm) compared to pristine PAN membranes, attributable to their high separation efficiency, oil-fouling resistance, and excellent environmental durability.