The enzyme carboxypeptidase-IIW of Bacillus megaterium incorporates free diaminopimelate into purified bacterial walls. This enzyme can be solubilized from toluene-treated cells by LiCl extraction and has now been purified 106-fold to one major band on polyacrylamide gel electrophoresis. The enzyme has an apparent molecular weight of approximately 60,000 by sodium dodecyl sulfate-polyacrylamide gel electrophoresis and by Sephadex G-100 gel filtration. Carboxypeptidase-IIW requires divalent cations and thiol group(s) for optimal activity. Product analysis indicates that the enzyme can hydrolyze the terminal D-alanine from the tetrapeptide of the peptidoglycan or replace it with a variety of amino acids with D-asymmetric centers for transpeptidation. Substrate specificity studies reveal that the enzymatic activity depends on the presence of N-acetyl-D-glucosamine of the GlcNAc-MurNAc-tetrapeptide. This specificity of carboxypeptidase-IIW for the N-acetyl-D-glucosamine explains in part the affinity of the enzyme for the cell wall of B. megaterium. The enzyme is compared to the carboxypeptidases-transpeptidases of other organisms with the similarities and differences discussed.