Developing the next-generation high-energy density and safe batteries is of prime importance to meet the emerging demands in electronics, automobile industries and various energy storage systems. High-voltage lithium-ion batteries (LIBs) and solid-state batteries (SSBs) are two main directions attracting increasing interest in recent years, due to their potential applications in the near future. In both kinds of batteries, the electrolytes play a pivotal role but also create several bottleneck problems. In this review, recent progress in designing electrolytes for high-voltage LIBs and SSBs is summarized. First, the solvents, additives, ionic liquids and superconcentrated salts strategies for constructing high-voltage liquid electrolytes are reviewed, and then the applications of inorganic solids, solid polymers, gels and ionic liquids in solid-state electrolytes are presented. Finally, the general design rules of the electrolytes and their current limitations and future prospects are briefly discussed.