Nondiapause pupae of Papilio machaon L. exhibit pupal colour diphenism comprising green–yellow and brown–white types. To understand the regulatory mechanism underlying the control of pupal colouration in P. machaon, the effect of environmental cues on diapause and nondiapause pupal colouration is investigated. When larvae reared under short-day and long-day conditions are allowed to pupate in sites with a smooth surface and a yellow background colour, all diapause pupae exhibit a brown–white type and 89.5% of nondiapause pupae exhibit a green–yellow type, respectively. With rough-surface pupation sites, all diapause pupae exhibit brown–white and intermediate types, whereas a large proportion of nondiapause pupae exhibit brown–white and intermediate types, although some exhibit a green–yellow type. When extracts prepared from the head-thoracic and thoracic-abdominal regions of larval central nervous systems are injected into the ligated abdomens of P. machaon short-day pharate pupae, all recipients exhibit a brown–white colouration. Furthermore, when each extract is injected into the ligated abdomen of Papilio xuthus L. short-day pharate pupae with orange-pupa-inducing factor activity, recipients injected with the head-thoracic extract exhibit the brown type, whereas those injected with the thoracic-abdominal extract exhibit an orange colour. The results indicate that the response to the environmental cues of pupation site in P. machaon changes according to the photoperiodic conditions experienced during larval stages, and that at least two hormonal factors producing brown–white pupae are located in the larval central nervous system, with the secretion of these factors being regulated by the recognition of environmental cues in long-day larvae.