Insect vectors are required for the transmission of many species of parasitic nematodes, but the mechanisms by which the vectors and nematodes coordinate their life cycles are poorly understood. Here, we report that ascarosides, an evolutionarily conserved family of nematode pheromones, are produced not only by a plant-parasitic nematode, but also by its vector beetle. The pinewood nematode and its vector beetle cause pine wilt disease, which threatens forest ecosystems world-wide. Ascarosides secreted by the dispersal third-stage nematode LIII larvae promote beetle pupation by inducing ecdysone production in the beetle and up-regulating ecdysone-dependent gene expression. Once the beetle develops into the adult stage, it secretes ascarosides that attract the dispersal fourth-stage nematode LIV larvae, potentially facilitating their movement into the beetle trachea for transport to the next pine tree. These results demonstrate that ascarosides play a key role in the survival and spread of pine wilt disease.