Cancer is a multifaceted global health issue and one of the leading causes of death worldwide. In recent years, medical science has achieved great advances in the diagnosis and treatment of cancer. Despite the numerous advantages of conventional cancer therapies, there are major drawbacks including severe side effects, toxicities, and drug resistance. Therefore, the urgency of developing new drugs with low cytotoxicity and treatment resistance is increasing. Antimicrobial peptides (AMPs) have attracted attention as a novel therapeutic strategy for the treatment of various cancers, targeting tumor cells with less toxicity to normal tissues. In this review, we present the structure, biological function, and underlying mechanisms of AMPs. The recent experimental studies and clinical trials on anticancer peptides in different cancer types as well as the challenges of their clinical application have also been discussed.