Proteins containing membrane attack complex/perforin (MACPF) domains play important roles in vertebrate immunity, embryonic development, and neural-cell migration. In vertebrates, the ninth component of complement and perforin form oligomeric pores that lyse bacteria and kill virus-infected cells, respectively. However, the mechanism of MACPF function is unknown. We determined the crystal structure of a bacterial MACPF protein, Plu-MACPF from Photorhabdus luminescens, to 2.0 angstrom resolution. The MACPF domain reveals structural similarity with poreforming cholesterol-dependent cytolysins (CDCs) from Gram-positive bacteria. This suggests that lytic MACPF proteins may use a CDC-like mechanism to form pores and disrupt cell membranes. Sequence similarity between bacterial and vertebrate MACPF domains suggests that the fold of the CDCs, a family of proteins important for bacterial pathogenesis, is probably used by vertebrates for defense against infection.