The purpose of the present invention is to provide an α, β-unsaturated amide compound or a pharmaceutically acceptable salt thereof or the like, which has anti-cancer activity or the like. An α, β-unsaturated amide compound represented by formula (I) and a pharmaceutically acceptable salt thereof or the like have anti-cancer activity or the like. (In the formula, A represents an optionally substituted heterocyclic diyl group; R1 represents a hydrogen atom or an optionally substituted lower alkyl group; R2 represents an optionally substituted aryl group, an optionally substituted cycloalkyl group, an optionally substituted aliphatic heterocyclic group or an optionally substituted aromatic heterocyclic group; X represents -O-, -S-, -SO2-, -NRX1- (wherein RX1 represents a hydrogen atom or a lower alkyl group), -CHRX2- (wherein RX2 represents a hydrogen atom or a hydroxy group), -CH=CH-, -CO- or -NH-CO-; and n1 and n2 may be the same or different, and each represents 0 or 1.)