Antimicrobial peptides (AMPs) are key components of innate immune defenses. Because of the antibiotic crisis, AMPs have also come into focus as new drugs. Here, we explore whether prior exposure to sub-lethal doses of AMPs increases bacterial survival and abets the evolution of resistance. We show that Escherichia coli primed by sub-lethal doses of AMPs develop tolerance and increase persistence by producing curli or colanic acid, responses linked to biofilm formation. We develop a population dynamic model that predicts that priming delays the clearance of infections and fuels the evolution of resistance. The effects we describe should apply to many AMPs and other drugs that target the cell surface. The optimal strategy to tackle tolerant or persistent cells requires high concentrations of AMPs and fast and long-lasting expression. Our findings also offer a new understanding of non-inherited drug resistance as an adaptive response and could lead to measures that slow the evolution of resistance.