The invention relates to an assistant agent used for dyeing and printing a textile, particularly a cleaning agent used for preventing a contaminant during the soaping process after the textile is dyed and printed, and belongs to the textile dyeing technology field. The assistant agent comprises the following components by mass percentage: 2% to 15% of N-vinyl pyrrolidone/ acrylamide/ vinyl alcohol terpolymer, 2% to 15% of maleic acid/ acrylic copolymer, 0 to 10% of sodium polyacrylate, 2% to 15% of aliphatic amine polyethenoxy ether, 2% to 15% of fatty alcohol polyoxyethylene ether, and water in balancing amount. The assistant agent has the advantages that: the components meet the standard of ecological textiles and the environmental protection requirements, the assistant agent has a certain cationic nature, thus having good affinity for the anionic dye used for conventional dyeing and printing, is conducive to washing and removing the dye which is attached to the textile, and meanwhile, has protective colloidal properties, thus allowing the removed dye to be stably existing in a washing solution, so as to prevent second contamination.