The invention aims at providing a rodent repellent which exerts satisfactory repellent effect against rodents such as rat and mouse and is excellent in the persistency of the effect and a method of repelling rodents with the same. The invention relates to a rodent repellent containing as the active ingredient a nitrogen-containing compound having at least one kind of partial structure selected from the group consisting of (A) heterocycles each bearing two or three nitrogen atoms in the skeleton, (B) N-N single bond, and (C) azo group, preferably a compound selected from the group consisting of metoxadiazone, pyrazolone orange, azobenzene and azodicarbonamide; and a method of repelling rodents with the rodent repellent.