Endolysins are bacteriophage-encoded peptidoglycan hydrolases that specifically degrade the bacterial cell wall at the end of the phage lytic cycle. They feature a distinct modular architecture, consisting of enzymatically active domains (EADs) and cell wall-binding domains (CBDs). Structural analysis of the complete enzymes or individual domains is required for better understanding the mechanisms of peptidoglycan degradation and provides guidelines for the rational design of chimeric enzymes. We here report the crystal structure of the EAD of PlyP40, a member of the GH-25 family of glycosyl hydrolases, and thefirst muramidase reported for Listeria phages. Site-directed mutagenesis confirmed key amino acids (Glu98 and Trp10) involved in catalysis and substrate stabilization. In addition, we found that PlyP40 contains two heterogeneous CBD modules with homology to SH3 and LysM domains. Truncation analysis revealed that both domains are required for full activity but contribute to cell wall recognition and lysis differently. Replacement of CBDP40 with a corresponding domain from a different Listeria phage endolysin yielded an enzyme with a significant shift in pH optimum. Finally, domain swapping between PlyP40 and the streptococcal endolysin Cpl-1 produced an intergeneric chimera with activity against Listeria cells, indicating that structural similarity of individual domains determines enzyme function.