Bacillus subtilis lacks a recognizable homologue of the LipB octanoyltransferase, an enzyme essential for lipoic acid synthesis in Escherichia coli. LipB transfers the octanoyl moiety from octanoyl-acyl carrier protein to the lipoyl domains of the 2-oxoacid dehydrogenases via a thioester-linked octanoyl-LipB intermediate. The octanoylated dehydrogenase is then converted to the enzymatically active lipoylated species by insertion of two sulfur atoms into the octanoyl moiety by the S-adenosyl-l-methionine radical enzyme, LipA (lipoate synthase). B. subtilis synthesizes lipoic acid and contains a LipA homologue that is fully functional in E. coli. Therefore, the lack of a LipB homologue presented the puzzle of how B. subtilis synthesizes the LipA substrate. We report that B. subtilis encodes an octanoyltransferase that has virtually no sequence resemblance to E. coli LipB but instead has a sequence that resembles that of the E. coli lipoate ligase, LplA. On the basis of this resemblance, these genes have generally been annotated as encoding a lipoate ligase, an enzyme that in E. coli scavenges lipoic acid from the environment but plays no role in de novo synthesis. We have named the B. subtilis octanoyltransferase LipM and find that, like LipB, the LipM reaction proceeds through a thioester-linked acyl enzyme intermediate. The LipM active site nucleophile was identified as C150 by the finding that this thiol becomes modified when LipM is expressed in E. coli. The level of the octanoyl-LipM intermediate can be significantly decreased by blocking fatty acid synthesis during LipM expression, and C150 was confirmed as an essential active site residue by site-directed mutagenesis. LipM homologues seem the sole type of octanoyltransferase present in the firmicutes and are also present in the cyanobacteria. LipM type octanoyltransferases represent a new clade of the PF03099 protein family, suggesting that octanoyl transfer activity has evolved at least twice within this superfamily.