Lithium-ion batteries (LIBs) are among the most promising devices for electrochemical energy storage from renewable sources and for the development of long-range electric vehicles. However, the increasing demand for some critical raw materials used in LIBs (e.g., lithium, cobalt, nickel) may pose supply risks in the near future and raise relevant environmental concerns. Electroactive organic materials have attracted much interest as an alternative to inorganic electrodes because they are based on abundant elements (e.g., carbon, oxygen, sulphur, nitrogen), are environmentally friendly, may have high theoretical capacities and their electrochemical performance can be finely modulated by chemical design. However, organic electrodes based on small molecules generally suffer from high solubility in electrolyte, resulting in fast capacity fading. A successful strategy to overcome the solubility problem is the polymerisation of redox-active building blocks to increase the cycling stability and insolubility in electrolyte. Covalent organic frameworks (COFs) are crystalline porous polymers based on organic building blocks linked by strong covalent bonds. Electroactive COFs have recently emerged as promising electrode materials due to their insolubility in electrolyte, high chemical and structural versatility, tuneable porosity, and the possibility to introduce numerous redoxactive centres in a controlled manner. However, some challenges such as the relatively low electronic conductivity or sluggish ion diffusion problems in bulk COFs 23 still need to be addressed to increase their practical capacity. In many cases, COFs have been mixed with conductive carbon substrates (carbon nanotubes, graphene, conductive polymers , etc.) to increase the electronic conductivity of the composite electrode, but this may reduce the overall energy density of the battery. Another recent strategy to increase the practical capacity of the active material is the exfoliation of bulk COFs into few-layer nanosheets to maximise the utilisation efficiency of the redox-active sites. Nevertheless, the yield for the synthesis of few-layer COFs nanosheets is usually very low, which might be an insurmountable challenge going toward practical applications. Much less attention has been invested into studying the influence of the electrolyte and binder on the performance of COF-based batteries and no systematic correlation analysis has been reported to date. It is worth noting that the nature of the electrolyte can have a major impact on the performance of organic batteries. On the other hand, although polyvinylidene fluoride (PVdF) is widely used as a binder with inorganic electrode materials, it can have a weaker affinity for organic electrode materials, and raises serious environmental concerns due to the use of N-methyl-2-pyrrolidinone (NMP) as a solvent. Among alternative rechargeable battery technologies, magnesium batteries have attracted a lot of interest because Mg is an earth-abundant element, inexpensive, safe under ambient atmosphere, and has a high volumetric capacity. However, Mg 2+ insertion in most cathode materials (especially in the inorganic ones) presents several problems because of the strong electrostatic interaction between the divalent cations and the host materials, difficult desolvation and slow Mg 2+ diffusion. Organic materials have been proposed as a versatile and environmentally friendly alternative cathodes that can improve the kinetics and cycling stability in Mg batteries. In this sense, COFs have been scarcely investigated as electrodes for Mg batteries and, although they are very promising, only a few examples have been reported very recently. Herein, we report a comprehensive study of the influence of the electrolyte and binder on the performance of COF-based batteries. A redox-active anthraquinone-based COF (DAAQ-TFP-COF) (Scheme 1) was evaluated in four different Li electrolytes with two different binders. The combination of lithium bis(trifluoromethanesulfonyl)imide (LiTFSI) in tetraethylene glycol dimethyl ether (TEGDME) as the electrolyte and poly(tetrafluoroethylene) (PTFE) as the binder resulted in specific capacities close to the theoretical value with high capacity retention. It is worth noting that the bulk COF was not subjected to any processing. Ex situ infrared spectroscopy confirmed the highly reversible reduction of the anthraquinone electroactive moieties. Building on the efficient material utilisation seen in lithium-based electrolytes, DAAQ-TFP COF was also explored as cathode in magnesium batteries. Our results show that in addition to the proper design and processing of the COF as an active material, the choice of the electrolyte and binder can be critical to the performance of COF-based metal anode batteries.