The emergence of drug-resistant genes and concerns about food safety caused by the overuse of antibiotics are becoming increasingly prominent. There is an urgent need for effective alternatives to antibiotics in the fields of livestock production and human medicine. Antimicrobial peptides can effectively replace antibiotics to kill pathogens and enhance the immune functions of the host, and pathogens cannot easily produce genes that are resistant to them. The ability of antimicrobial peptides (AMPs) to kill pathogens is associated with their structure and physicochemical properties, such as their conformation, electrical charges, hydrophilicity, and hydrophobicity. AMPs regulate the activity of immunological cells and stimulate the secretion of inflammatory cytokines via the activation of the NF-κB and MAPK signaling pathways. However, there are still some limitations to the application of AMPs in the fields of livestock production and human medicine, including a restricted source base, high costs of purification and expression, and the instability of the intestines of animals and humans. This review summarizes the information on AMPs as effective antibiotic substitutes to improve the immunological functions of the host through suppressing pathogens and regulating inflammatory responses. Potential challenges for the commercial application of AMPs in animal husbandry and human medicine are discussed.