In this work, neat and modified nanodiamond (ND) particles were embedded into high-density polyethylene (HDPE) membranes to improve hydrophilicity and antifouling properties. The membranes were prepared via thermally induced phase separation (TIPS) method and used for pharmaceutical wastewater treatment in membrane bioreactors (MBR) system. To prevent the agglomeration of ND, it was modified using two methods: thermal carboxylation (ND-COOH) and grafting with polyethylene glycol (ND-PEG). Membranes with different concentration of ND-COOH and ND-PEG nanoparticles ranging from 0.00 to 1.00 wt % were prepared and characterized using a set of analyses including water contact angle, pure water flux, tensile strength, differential scanning calorimeter, field emission scanning electron microscopy, and energy dispersive X-ray spectroscopy. It was found that the optimum contents of ND-COOH and ND-PEG nanoparticles were 0.50 wt % and 0.75 wt %, respectively. The interfacial interaction between nanoparticles and HDPE matrix was studied based on Pukanzsky model. To examine the performance of membranes, critical flux, filtration experiment in the MBR, and fouling analysis of membranes were carried out. The results showed that among the fabricated membranes, 0.75 wt % HDPE/ND-PEG membrane had the highest water flux and the best antifouling properties.