Infectious diseases caused by pathogenic bacteria invasion have become a serious threat to human life and health. In this study, polyhexamethylguanidine (PHMG) is anchored onto sesbania gum (SG) by an oxidation reaction coupled with the Schiff base reaction to endow antibacterial function. By the assistance of the oxidation reaction using sodium periodate (NaIO4) as an oxidizing agent, the oxidized SG (OSG) forms and contributes to the generation of a platform with active sites for further antibacterial modification with PHMG. Then PHMG as antibacterial ingredient covalently bind on OSG, which helps to achieve SG‐PHMG. After the colony counting method and inhibition zone test, SG‐PHMG shows excellent antibacterial ability against 108 CFU mL−1 of Escherichia coli (E. coli). More interestingly, the grafting of PHMG makes SG more hydrophilic, and allows SG‐PHMG fully contact with bacteria, as a result showing excellent antibacterial activity. It is believed that this strategy has great potential for the antibacterial‐associated applications.