The invention relates to a method for preparing an uramine-type macromolecule anti-bacterial agent, comprising two steps as follows: A, mixing any one solution of guanidine hcl, Polyhexamethyleneguanidine chloride and polyhexamethylene biguanide hydrochloride with maleic anhydride solution; introducing nitrogen for constant-temperature water bath reaction to obtain functional uramine salt; B, mixing functional uramine salt solution with acrylamide and / or styrene for constant-temperature water bath reaction to obtain ivory-white stringy liquid; depositing soft white solid with solvent for vacuum drying to obtain ivory-white bulk uramine-type copolymer, i.e, uramine-type macromolecule anti-bacterial agent. The uramine-type macromolecule anti-bacterial agent has remarkable effect and simple synthesis process, ensures that the anti-bacterial group is hard to move and the processing thermal stability is excellent through copolymerization on macromolecule long chain. The invention can be widely used in fields of plastic, dope, powder dope, rubber, wood plastic, rubber plastic, spinning, water processing, and the like.