Batesian mimicry protects animals from predators through resemblance with distasteful models in shape, color pattern, or behavior. To elucidate the wing coloration mechanisms involved in the mimicry, we investigated chemical composition and gene expression of the pale yellow and red pigments of a swallowtail butterfly, Papilio polytes, whose females mimic the unpalatable butterfly Pachliopta aristolochiae. Using LC/MS, we showed that the pale yellow wing regions in non-mimetic females consist of kynurenine and N-β-alanyldopamine (NBAD). Moreover, qRT-PCR showed that kynurenine/NBAD biosynthetic genes were upregulated in these regions in non-mimetic females. However, these pigments were absent in mimetic females. RNA-sequencing showed that kynurenine/NBAD synthesis and Toll signaling genes were upregulated in the red spots specific to mimetic female wings. These results demonstrated that drastic changes in gene networks in the red and pale yellow regions can switch wing color patterns between non-mimetic and mimetic females of P. polytes.