R-type pyocins are representatives of contractile ejection systems, a class of biological nanomachines that includes, among others, the bacterial type VI secretion system (T6SS) and contractile bacteriophage tails. We report atomic models of the Pseudomonas aeruginosa precontraction pyocin sheath and tube, and the postcontraction sheath, obtained by cryo-EM at 3.5-Å and 3.9-Å resolutions, respectively. The central channel of the tube is negatively charged, in contrast to the neutral and positive counterparts in T6SSs and phage tails. The sheath is interwoven by long N- and C-terminal extension arms emanating from each subunit, which create an extensive two-dimensional mesh that has the same connectivity in the extended and contracted state of the sheath. We propose that the contraction process draws energy from electrostatic and shape complementarities to insert the inner tube through bacterial cell membranes to eventually kill the bacteria.