The present invention provides compounds useful as agents for the prevention or treatment of a sex hormone-dependent disease or the like. That is, the present invention provides fused heterocyclic derivatives represented by the following general formula (I) which has a GnRH antagonistic activity, pharmaceutical compositions containing the same, medicinal uses thereof and the like. In the formula (I), rings A is 5-membered cyclic unsaturated hydrocarbon or 5-membered heteroaryl; R A is halogen, alkyl, alkenyl, alkynyl, carboxy, alkoxy, carbamoyl, alkylcarbamoyl, etc.; ring B is aryl or heteroaryl; R B is halogen, alkyl, carboxy, alkoxy, carbamoyl, alkylcarbamoyl, etc.; E 1 and E 2 are oxygen atom, etc.; Q is hydrogen atom, alkyl, alkylsulfonyl, acyl, etc.; X is -(alkylene)-Z, -CO-Y, -SO 2 -Y, etc. (in which Y is Z or amino, etc.; Z is cycloalkyl, heterocycloalkyl, aryl, heteroaryl, etc.