A series of amphoteric macromolecular dyes were designed and synthesized from poly(acrylamide-co-vinylamine) oligomer and reactive dyes. The structure of the synthesized dyes was characterized by fourier transform infrared spectra, mass spectra, and ultraviolet–visible spectroscopy analysis. The solubility of the dyes was also investigated. The results showed that the solubility of the dyes can be controlled by tuning the ratio of amino to sulfonate groups in amphoteric macromolecular dyes. Based on the results of controllable solubility conducted by visible light transmittance measurements, amphoteric macromolecular dyes were used to dye cotton fiber; the fixation of the dye on cotton was more than 95% when crosslinking agent was added. The dyed samples exhibited good fastness to washing and rubbing. © 2014 Wiley Periodicals, Inc. J. Appl. Polym. Sci. 2014, 131, 41120.