Coenzyme F420 is a microbial redox cofactor that is increasingly used for biocatalytic applications. Recently, diversified biosynthetic routes to F420 and the discovery of a derivative, 3PG-F420, were reported. 3PG-F420 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-F420 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 F420 derivatives in the future.