The present invention provides a bicyclic heterocyclic amide derivative of formula (1) wherein ring Q 1 is optionally-substituted C 6-10 aryl group, etc.; R 1 and R 2 are independently hydrogen atom, etc.; W 1 is optionally-substituted C 1-4 alkylene group; W 2 is -NR 3a C(O)-, etc. wherein R 3a is hydrogen atom or C 1-6 alkyl group; Cy 1 is the following group of formula (11), etc.; ring Q 2 is optionally-substituted benzene ring, etc.; n and m are indepndently 0, 1 or 2, provided that n and m are not simultaneously 0; X is NR 5 , etc.; R 5 is hydrogen atom, etc.; p is 1, 2, 3, 4 or 5; R 4 is, independently when two or more exist, hydrogen atom, etc.; and a pharmacologically acceptable salt thereof, which have a potent inhibitory effect on the sphere-forming ability of cancer cells and are useful as an orally-available anti-tumor agent.