Membrane‐based treatment for demulsification remains a significant challenge due to membrane fouling. In this work, the demulsification and membrane separation technology were combined to design polyvinylidene fluoride (PVDF) membrane with demulsification function. The hyperbranched polyethyleneimine was prepared by the acyl chloride reaction and grafted on the PVDF membrane by dopamine. The effects of different amounts of hyperbranched polyethyleneimine on PVDF membrane were studied. The modified membrane was characterized by SEM, CA, FTIR, and XPS, and then the optimum preparation conditions were selected. The separation test shows that the modified membrane can be used to separate oil‐in‐water emulsions and the separation efficiency was more than 90%, meanwhile it showed good anti‐pollution performance owing to the water‐based protective layer on the membrane surface and the steric effect of the branches. In addition, the demulsification mechanism was analyzed and it was found that the surface tension was the key point for demulsification.