Polymer materials such as polyimide can be used to make ultrafiltration membranes, but the hydrophobic surface is susceptible to contamination, resulting in a decline in its antifouling performance. In this study, hydrophilic nanodiamond particles were prepared by deep eutectic solvent modification and then added to polyimide solution to prepare ultrafiltration membrane. The introduction of modified nanodiamonds is beneficial to increase membrane porosity, mean pore size, and hydrophilicity. As a result, the polyimide membrane embedded with modified nanodiamonds demonstrated good antifouling properties and a better flux recovery. The modified nanodiamond particles as pore-forming additives for ultrafiltration membranes are promising for removing organic pollution produced by natural organic matter.