Abstract Coenzyme F 420 is a microbial redox cofactor that is increasingly used for biocatalytic applications. Recently, diversified biosynthetic routes to F 420 and the discovery of a derivative, 3PG-F 420 , were reported. 3PG-F 420 is formed via activation of 3-phospho-D-glycerate (3-PG) by CofC, but the structural basis of substrate binding, its evolution, as well as the role of CofD in substrate selection remained elusive. Here, we present a crystal structure of the 3-PG-activating CofC from Mycetohabitans sp. B3 and define amino acids governing substrate specificity. Site-directed mutagenesis enabled bidirectional switching of specificity and thereby revealed the short evolutionary trajectory to 3PG-F 420 formation. Furthermore, CofC stabilized its product, thus confirming the structure of the unstable molecule, revealing its binding mode and suggesting a substrate channeling mechanism to CofD. The latter enzyme was shown to significantly contribute to the selection of related intermediates to control the specificity of the combined biosynthetic CofC/D step. Taken together, this work closes important knowledge gaps and opens up perspectives for the discovery, enhanced biotechnological production, and engineering of coenzyme F 420 derivatives in the future. Importance The microbial cofactor F 420 is crucial for processes like methanogenesis, antibiotics biosynthesis, drug resistance, and biocatalysis. Recently, a novel derivative of F 420 (3PG-F 420 ) was discovered, enabling the production and use of F 420 in heterologous hosts. By analyzing the crystal structure of a CofC homolog whose substrate choice leads to formation of 3PG-F 420 , we defined amino acid residues governing the special substrate selectivity. A diagnostic residue enabled reprogramming of the substrate specificity, thus mimicking the evolution of the novel cofactor derivative and successfully guiding the identification of further 3-PG-activating enzymes. Furthermore, a labile reaction product of CofC was revealed that has not been directly detected so far and CofD was shown to provide as another layer of specificity of the combined CofC/D reaction, thus controlling the initial substrate choice of CofC. The latter finding resolves a current debate in the literature about the starting point of F 420 biosynthesis in various organisms.