An antimicrobial peptide WY-21 has amino acid sequence of Val-Lys-Phe-Phe-Arg-Lys-Leu-Lys-Lys-Ser-Val-Lys-Glu-Lys-Ile-Gly-Lys-Glu-Phe-Lys-Arg. The antimicrobial peptide WY-21 can be used as broad-spectrum antibacterial agents for the treatment of Gram-negative or Gram-positive bacterial infection. It can also be applied for reducing immune system regulated inflammation.