Baculoviruses can induce climbing behaviour in their caterpillar hosts to ensure they die at elevated positions to enhance virus transmission, providing an excellent model to study parasitic manipulation of host behaviour. Here, we demonstrate that climbing behaviour occurred mostly during daylight hours, and that the height at death of Helicoverpa armigera single nucleopolyhedrovirus (HearNPV)-infected larvae increases with the height of the light source. Phototaxic and electroretinogram (ERG) responses were enhanced after HearNPV-infection in host larvae, and ablation of stemmata in infected larvae prevented both phototaxis and climbing behaviour. Through transcriptome and quantitative PCR, we confirmed that two opsin genes (a blue light-sensitive gene, HaBL; and a long wave-sensitive gene, HaLW) as well as the TRPL (transient receptor potential-like channel protein) gene, all integral to the host's visual perception pathway, were significantly upregulated after HearNPV infection. Knockout of HaBL, HaLW, or TRPL genes using the CRISPR/Cas9 system resulted in significantly reduced ERG responses, phototaxis, and climbing behaviour in HearNPV-infected larvae. These results reveal that HearNPV alters the expression of specific genes to hijack host visual perception at fundamental levels—photoreception and phototransduction—in order to induce climbing behaviour in host larvae.