Polymer templates are a facile way to control the formation, size, and shape of different inorganic nanomaterials by tuning solution behavior, morphology, or density and the type of functional groups. As a novel class of such templates, we herein introduce polyampholytic graft copolymers, more specifically, poly(dehydroalanine)-graft-poly-(ethylene glycol) (PDha-g-PEG), which feature a polyampholytic backbone with varying net charge and charge densities at different pH values and PEG grafts, providing molecular solubility over the entire pH range. As the PDha backbone features both amino and carboxylic acid groups in each repeat unit, selective interaction with [AuCl 4 ]and Ag + salts is possible, and this permits a straightforward synthesis of Ag, Au, and AgAu alloy nanoparticles. In this regard, we used different approaches: light-induced, thermal, and chemical reduction. As a unique feature, PDha-g-PEG enables control over AgAu nanoalloy composition via the pH value, as this directly affects the charge ratio (−NH 3 + /−COO − ) along the polymeric backbone. The obtained hybrid materials were investigated with respect to structure, shape, composition, and optical properties of nanoparticles via transmission electron microscopy, X-ray photoelectron spectroscopy, energy-dispersive X-ray spectroscopy, thermogravimetric analysis, and UV−vis spectroscopy. In our opinion, this is a facile way to control nanoalloy composition and this can be extended to other mono-or bimetallic nanoparticle examples.