Rechargeable magnesium batteries (RMBs) have the potential to provide a sustainable and long-term solution for large-scale energy storage due to high theoretical capacity of magnesium (Mg) metal as an anode, its competitive redox potential (Mg/Mg2+: -2.37 V vs. SHE) and high natural abundance. To develop viable magnesium batteries with high energy density, the electrolytes must meet a range of requirements: high ionic conductivity, wide electrochemical potential window, chemical compatibility with electrode materials and other battery components, favourable electrode-electrolyte interfacial properties and cost-effective synthesis. In recent years, significant progress in electrolyte development has been made. Herein, a comprehensive overview of these advancements is presented. Beginning with the early developments, we particularly focus on the chemical aspects of the electrolytes and their correlations with electrochemical properties. We also highlight the design of new anions for practical electrolytes, the use of electrolyte additives to optimize anode-electrolyte interfaces and the progress in polymer electrolytes.