Antibiotic resistance has been widely recognized as a global threat to public health, calling for alternative antimicrobial agents. Here, we focused on acyl-lysine, a biomimetic polymer with proven antimicrobial activity. Using atomic-scale computer simulations, we show that the binding of acyl-lysine to model bacterial membranes is a two-step process. The first step is the electrostatic attraction of cationic acyl-lysine to anionic membranes. The second step is the embedding of the dodecanoyl N-terminal tail of acyl-lysine into the membrane's hydrophobic core, which makes the long hydrophobic tail a molecular anchor and stabilizes the binding. This anchor was found to be critical for embedding acyl-lysine oligomers with relatively short acyl spacers (aminobutyryl-lysine and aminooctanoyl-lysine repeating units): cutting off the hydrophobic tail made the insertion of these oligomers into the membrane less deep, which can be linked to lower antimicrobial activity. In turn, acyl-lysine oligomers with long acyl spacers (aminododecanoyl-lysine monomers) form a highly structured aggregate, which represents a stack of intrinsically ordered oligomers. Such aggregates strongly suppress embedding of the oligomers into the bacterial membrane. Overall, our computational findings offer a molecular-level interpretation of experimental data for the antimicrobial activity of acyl-lysine and can be used for the further development of antimicrobial agents to overcome antibiotic resistance.