The present invention provides a STAT3 inhibitor containing as an active ingredient, a quinolinecarboxamide derivative represented by the formula (I) (in the formula, W represents a bond or an alkylene chain; X represents O, S, or NR 34 ; and R 1 to R 8 and R 34 each represent H, halogen, alkyl, phenyl, furyl, thienyl, or the like.), or a pharmacologically acceptable salt thereof.