[Purpose] The present invention provides compounds useful as agents for the prevention or treatment of a sex hormone-dependent disease or the like. [Solution] The present invention provides nitrogen-containing fused ring derivatives represented by the following general formula (I) which has a GnRH antagonistic activity, prodrugs, salts, pharmaceutical compositions containing the same, medicinal uses thereof and the like. In the formula (I), rings A and B are independently aryl or heteroaryl; R A and R B are independently halogen, cyano, alkyl, alkylsulfonyl, -OW 1 , -SW 1 , -COW 2 , -NW 3 W 4 , -SO 2 NW 3 W 4 , aryl, etc.; R C is H or alkyl; E is oxygen atom, etc.; U is single bond or alkylene; and X is Y, -CO-Y, -SO 2 -Y -S-(alkylene)-Y, -O-(alkylene)-Y, -SO 2 -(alkylene)-Y, etc.; Y is Z or amino, etc.; and Z is cycloalkyl, heterocycloalkyl, aryl, heteroaryl, etc.