Catalyzes the addition of D-aspartate onto the lysine residue in the peptidoglycan precursor UDP-MurNAc-pentapeptide. The ligation occurs between the beta-carboxylate of D-Asp and the epsilon-amino group of L-Lys. Is highly specific for D-aspartate, as L-aspartate, D-glutamate, D-alanine, D-iso-asparagine and D-malate are not substrates. [beta-GlcNAc-(1->4)-Mur2Ac(oyl-L-Ala-gamma-D-Glu-L-Lys-D-Ala-D-Ala)](n) + n ATP + n D-aspartate = [beta-GlcNAc-(1->4)-Mur2Ac(oyl-L-Ala-gamma-D-Glu-6-N-(beta-D-Asp)-L-Lys-D-Ala-D-Ala)]n + n ADP + n H(+) + n phosphate Binds 2 magnesium ions per subunit. Cell wall biogenesis; peptidoglycan biosynthesis. The substrate D-aspartate is provided by the coexpressed aspartate racemase, whose gene is adjacent to that of the D-aspartate ligase.