To address how organisms adapt to a new environment, subterranean organisms whose ancestors colonized subterranean habitats from surface habitats have been studied. Photoreception abilities have been shown to have degenerated in organisms living in caves and calcrete aquifers. Meanwhile, the organisms living in a shallow subterranean environment, which are inferred to reflect an intermediate stage in an evolutionary pathway to colonization of a deeper subterranean environment, have not been studied well. In the present study, we examined the photoreception ability in a trechine beetle,Trechiama kuznetsovi, which inhabits the upper hypogean zone and has a vestigial compound eye. By de novo assembly of genome and transcript sequences, we were able to identify photoreceptor genes and phototransduction genes. Specifically, we focused onopsingenes, where onelong wavelength opsingene and oneultraviolet opsingene were identified. The encoded amino acid sequences had neither a premature stop codon nor a frameshift mutation, and appeared to be subject to purifying selection. Subsequently, we examined the internal structure of the compound eye and nerve tissue in the adult head, and found potential photoreceptor cells in the compound eye and nerve bundle connected to the brain. The present findings suggest thatT. kuznetsovihas retained the ability of photoreception. This species represents a transitional stage of vision, in which the compound eye regresses, but it may retain the ability of photoreception using the vestigial eye.Supplementary InformationThe online version contains supplementary material available at 10.1186/s40851-023-00208-7.