A pharmaceutical composition is suitable for treating AXL-related cancer. The cancer can be cancer with high expression of AXL. The cancer can also be cancer which has acquired resistance by the activation of AXL against therapy with an anticancer agent. Specific diamino heterocyclic carboxamide compounds have an AXL inhibitory action, and pharmaceutical compositions comprising these compounds as an active ingredient have a therapeutic effect on AXL-related cancer. This AXL-related cancer can be cancer with high expression of AXL and/or cancer which has acquired resistance by the activation of AXL against therapy with an anticancer agent.