Nitrogen-containing compounds represented by general formula (I) or salts thereof; and insecticides, miticides, sanitary harmful insect expellants, or harmful organism control agents, which contain the compounds or salts thereof as the active ingredient. In general formula (I), R is a nitro group or the like; Z is a substituted or unsubstituted aryl group or the like; R is a hydrogen atom or the like; Y is a nitro group or the like; n is an integer of 0 to 3; D is a 5- to 8-membered carbocyclic or heterocyclic group which may have also a substituent other than X; X is a group represented by general formula (II-1) [wherein R and R are each independently a hydrogen atom or the like]; A is a carbon atom or the like; and n1 is an integer of 0 to 2.