The improper use of antibiotics in patients around the world increased the risk of multidrug-resistant bacterial infection and became a serious global health threat. Although many natural anti-bacterial peptides have been discovered, the low bioavailability of natural anti-bacterial peptides limited their therapeutic effect. Hence, it is necessary to develop customized synthetic anti-bacterial polypeptides. Poly(L-lysine) (PLL) is well-known to exhibit anti-bacterial properties. The tethering of hydrophobic peptide segments onto PLL might be able to improve not only the biocompatibility but also the anti-bacterial activity. The experimental data showed that the hydrophobic peptide segments played an important role in the biocompatibility and anti-bacterial activity of the block polypeptides. Among them, linear and 3-armed poly(L-lysine)-block-poly(L-alanine) block copolypeptides showed excellent biocompatibility and anti-bacterial activity against Staphylococcus aureus (S. aureus) and Shigella flexneri (S. flexneri). The in vivo experiments confirmed that the polypeptides could protect Caenorhabditis elegans (C. elegans) from bacterial infection, evidenced by the prolonged lifespan in the presence of polypeptides. Our results showed that these polypeptides could be potential candidates for treating bacterial infections.