F420 is a unique redox cofactor used by diverse bacteria and archaea [1]. Given its low redox potential (Eo = -340 mV) and obligate two-electron chemistry, microorganisms use this cofactor to catalyse hydrogenation of various recalcitrant organic compounds [2]. In Mycobacterium tuberculosis, F420 has a multifaceted role: it supports adaptation to redox stress, mediates the detoxification of antibiotics, and activates the clinical antitubercular prodrugs pretomanid and delamanid via the enzyme Ddn [3, 4]. A recent in vitro study proposed a revised biosynthesis pathway for F420 in mycobacteria; it was suggested that phosphoenolpyruvate served as a metabolic precursor for this pathway [5], rather than 2-phospholactate as long proposed, but these findings were subsequently challenged [6]. In this work, we combined metabolomic, genetic, and structural analyses to resolve these discrepancies and determine the basis of F420 biosynthesis in mycobacterial cells. We show that, in whole cells of Mycobacterium smegmatis, phosphoenolpyruvate rather than 2-phospholactate stimulates F420 biosynthesis. Analysis of F420 intermediates present in M. smegmatis cells, harbouring genetic deletions at each step of the F420 biosynthetic pathway, confirmed that the use of phosphoenolpyruvate leads to the production of the novel precursor compound dehydro-F420-0 by the enzyme FbiA. To determine the structural basis of dehydro-F420-0 production, we solved high-resolution crystal structures of FbiA in apo, substrate, and product bound forms. These data show the essential role of a single divalent cation in coordinating the catalytic precomplex of this enzyme and demonstrate that dehydro-F420-0 synthesis occurs through a direct substrate transfer mechanism. The role of F420 in multiple aspects of mycobacteria metabolism makes its biosynthetic pathway a promising target for the development of novel antitubercular compounds. The data we present here provides a strong basis for targeting this pathway for the development of such compounds.