PROBLEM TO BE SOLVED: To provide a nitrogen-containing heterocyclic compound or the like that can be commercially advantageously synthesized and can be an active ingredient of a noxious organism-controlling agent which achieves sure effects and can be used safely, and a noxious organism-controlling agent comprising the compound as an effective ingredient.SOLUTION: The compound is one represented by formula (I) or a salt thereof. The noxious organism-controlling agent comprises the compound as an effective ingredient thereof. In the formula, W is an oxygen atom or a sulfur atom X is CH, CH2, NH or the like A1-A4 are each independently a carbon atom or a nitrogen atom Y is a methyl group or the like n is an integer of 0-4 R1 and R2 are each independently a hydrogen atom, a pyridylmethyl group or the like Z is an optionally substituted phenyl group or the like and D is a haloalkyl group or the like.COPYRIGHT: (C)2008,JPO&INPIT【課題】工業的に有利に合成でき、効果が確実で安全に使用できる有害生物防除剤の活性成分となりうる含窒素へテロ環化合物等、及びこの化合物を有効成分とする有害生物防除剤を提供する。【解決手段】式(I)で表される化合物又はその塩、及びこれらの化合物を有効成分として含有する有害生物防除剤。(式中、Wは酸素原子又は硫黄原子を表し、XはCH、CH2、NH等を表し、A1~A4は各々独立して、炭素原子又は窒素原子を表し、Yはメチル基等を表し、nは0~4の整数を表し、R1、R2は各々独立して水素原子、ピリジルメチル基等を表し、Zは置換基を有していてもよいフェニル基等を表し、Dはハロアルキル基等を表す。)【選択図】なし