De novo design of peptides that self-assemble into transmembrane barrel-like nanopores is challenging due to the complexity of several competing interactions involving peptides, lipids, water, and ions. We have develop a computational approach for the de novo design of α-helical peptides that self-assemble into stable transmembrane barrel pores with a central nano-sized functional channel. We formulate the previously missing design guidelines and report 52 sequence patterns that can be tuned for specific applications using the identified role of each residue. Atomic force microscopy, fluorescent dye leakage, and cryo-EM experiments confirm that the designed peptides form leaky membrane nanopores in vitro. Customized designed peptides act as antimicrobial agents able to kill even antibiotic-resistant ESKAPE bacteria at micromolar concentrations, while exhibiting low toxicity to human cells. The peptides and their assembled nanopore structures can be similarly fine-tuned for other medical and biotechnological applications.