This work yields a novel antibacterial biomaterial (PEB). ► PEB was prepared under simple and mild condition. ► Raw materials for PEB were EDTAD, BDA and PP, all of which had good biocompatibility. ► PEB had an excellent antibacterial activity for Staphylococcus aureus. ► The antibacterial activity of PEB could be controlled by adjusting the material's composition.