Nicotinic acid is a precursor of the ubiquitous cofactors nicotinamide adenine dinucleotide (NAD) and nicotinamide adenine dinucleotide phosphate (NADP). Previous studies revealed that nicotinic acid is required for lactate racemization, an enzymatic activity that enables microorganisms to produce or use both isomers of lactate. Lactate racemase (Lar) was shown to harbor a nicotinic acid-derived cofactor that coordinates a nickel ion, forming a pincer complex. The biosynthesis of this cofactor requires three accessory proteins: LarB, LarC, and LarE. Here, we describe this biosynthetic pathway by showing that LarB carboxylates and hydrolyzes the NAD precursor nicotinic acid adenine dinucleotide (NaAD) and LarE sacrificially inserts two sulfur atoms into the product of LarB. Finally, LarC inserts the nickel ion to form the mature cofactor.