Biological electron transfer is challenging to directly regulate using environmental conditions. To enable dynamic, protein-level control over energy flow in metabolic systems for synthetic biology and bioelectronics, we created ferredoxin logic gates that utilize transcriptional and post-translational inputs to control energy flow through a synthetic electron transfer pathway that is required for bacterial growth. These logic gates were created by subjecting a thermostable, plant-type ferredoxin to backbone fission and fusing the resulting fragments to a pair of proteins that self-associate, a pair of proteins whose association is stabilized by a small molecule, and to the termini of a ligand-binding domain. We show that the latter domain insertion design strategy yields an allosteric ferredoxin switch that acquires an oxygen-tolerant [2Fe-2S] cluster and can use different chemicals, including a therapeutic drug and an environmental pollutant, to control the production of a reduced metabolite in Escherichia coli and cell lysates.