Graphical Abstract A cathode electrolyte interface (CEI) layer can be constructed on the surface of a Mo6S8 cathode through the oxidation of a boron-centered magnesium salt. This CEI layer is favorable for the desolvation of Mg2+, so that the chloride-free magnesium electrolyte can support the effective cycling of magnesium batteries. Abstract Magnesium (Mg) metal secondary batteries have attracted much attention for their high safety and high energy density characteristics.