The antibiotic D-cycloserine (DCS) targets the peptidoglycan biosynthesis enzyme D-Ala-D-Ala ligase (Ddl). Here the authors reveal the DCS inhibitory mechanism by determining the structure of E. coli DdlB with a phosphorylated DCS molecule in the active site that formed in crystallo and mimics the D-alanyl phosphate intermediate.