Various d‐amino acids are involved in peptidoglycan and biofilm metabolism in bacteria, suggesting that these compounds are necessary for successful adaptation to environmental changes. In addition to the conventional d‐alanine (d‐Ala) and d‐glutamate, the peptidoglycan of the hyperthermophilic bacterium Thermotoga maritima contains both l‐lysine (l‐Lys) and d‐Lys, but not meso‐diaminopimelate (meso‐Dpm). d‐Lys is an uncommon component of peptidoglycan, and its biosynthetic pathway remains unclear. In this study, we identified and characterized a novel Lys racemase (TM1597) and Dpm epimerase (TM1522) associated with the d‐Lys biosynthetic pathway in T. maritima. The Lys racemase had a dimeric structure containing pyridoxal 5′‐phosphate as a cofactor. Among the amino acids, it exhibited the highest racemase activity toward d‐ and l‐Lys, and also had relatively high activity toward d‐ and l‐enantiomers of ornithine and Ala. The Dpm epimerase had the highest epimerization activity toward ll‐ and meso‐Dpm, and also measurably racemized certain amino acids, including Lys. These results suggest that Lys racemase contributes to production of d‐Lys and d‐Ala for use as peptidoglycan components, and that Dpm epimerase converts ll‐Dpm to meso‐Dpm, a precursor in the l‐Lys biosynthetic pathway.