Electrification of transportation has been in progress with a global effort to reduce carbon emissions. Rechargeable batteries play a key role in electric vehicles, where high energy density is required for a long operation distance with a single charge. Metal anodes for rechargeable batteries have gained major attention as promising alternatives to commercial graphite anodes due to their high theoretical capacity. One of the main obstacles for metal anodes is a safety issue due to the short circuit during cycling. Polymer electrolytes are beneficial in terms of mechanical stability and safety, which can reduce electrolyte leakage and possible ignition upon a short circuit. However, polymer electrolytes have low ionic conductivity and high interfacial resistance resulting from poor contact on an electrode compared to liquid electrolytes. This thesis focuses on polymer electrolytes for Li and Mg metal anodes. The goal is to design polymer electrolytes compatible with Li or Mg metal anodes and understand ion conduction and deposition.For Li metal anodes, deposition/stripping performances and Li+ flux were investigated on two types of porous Li metal anode hosts (conductive and non-conductive) with a viscous polymer electrolyte. The non-conductive host demonstrated successful cycling upon deep deposition/stripping cycling, while the conductive host led a quick short circuit within a cycle. The Li deposition was found to be confined to the upper layer of the conductive host rather than uniform. Unlike Li metal anodes, Mg metal anode chemistry for Mg-conducting solid electrolyte interphase (SEI) layer is not found and reported reversible Mg deposition/stripping with polymer electrolytes is limited. Therefore, a quantitative study on Mg2+ ion conduction using conventional transference number measurement is less likely to be successful. Mg2+conduction and deposition were confirmed with an ionic conductivity test and constant potential deposition test. In this work, two types of Mg2+ ion-conducting polymer electrolytes (poly(ionic liquid)s with tethered anion and poly(caprolactone-carbonate)-based polymer electrolytes with a dual salt) are discussed.In Mg2+ ion-conducting poly(ionic liquid)s, different amounts of bulky cations were added to weaken overall cation-anion interaction, which will enhance polymer segmental motion and ion conduction. Changes in thermal and structural properties with bulky cation were investigated. The ionic conductivity increased with the bulky cation. Mg ion conduction and deposition were observed.For dual salt electrolytes, two different polymer hosts, poly(ε-caprolactone-trimethylene carbonate) (PCL-PTMC) and polyethylene oxide (PEO), are compared in terms of thermal behavior, coordination, and ion conduction and deposition. While quantitative Mg2+ conduction is unclear, ion coordination was found to be different in the two polymer types. It was found that the anions in PEO are mostly free anions due to the strong EO-Mg2+ coordination. On the other hand, a significant amount of the anions in PCL-PTMC were coordinating with Mg2+ cation due to the weaker coordination of the polymer host. The MgxTFSIy aggregates were observed on the working electrode after deposition, which implies the conduction and deposition of aggregates.Finally, Mg3Bi2 alloy anodes are discussed as a possible system for quantitative measurement of Mg2+ conduction (e.g. transference number). The alloy anodes were reported to have lower interfacial resistance buildup with non-corrosive electrolytes compared to Mg metal anodes.