Due to envelope differences between Gram-positive and Gram-negative bacteria1, engineering precision bactericidal contractile nanomachines2 requires atomic-level understanding of their structures; however, only those killing a Gram-negative bacterium are currently known3,4. Here, we report the atomic structures of an engineered diffocin, a contractile syringe-like molecular machine that kills the Gram-positive bacterium Clostridioides difficile. Captured in one pre-contraction and two post-contraction states, each structure fashions six proteins in the bacteria-targeting baseplate, two proteins in the energy-storing trunk, and a collar protein linking the sheath with the membrane-penetrating tube. Compared to contractile machines targeting Gram-negative bacteria, major differences reside in the baseplate and contraction magnitude, consistent with differences between their targeted envelopes. The multifunctional hub-hydrolase protein connects the tube and baseplate and is positioned to degrade peptidoglycan during penetration. The full-length tape measure protein forms a coiled-coil helix bundle homotrimer spanning the entire length of the diffocin. Our study offers mechanical insights and principles for designing potent protein-based precision antibiotics.