To meet the demands of next-generation optoelectronic circuits, the design and construction of photodetectors with a tunable photoresponse range and self-powered feature are urgently required. To achieve selective wavelength detection, a band-pass filter is usually required to dislodge the interference of a certain wavelength light, which inevitably enhances the weight and increases the cost. Here, we demonstrate a self-powered photodetector with a tunable response range by constructing a heterojunction structure consisting of poly(3-hexylthiophene) (P3HT), a TiO2 interlayer, and silicon nanowires. By controlling the P3HT concentration, both core-shell and embedded configurations can be obtained, which exhibit different response ranges. This work provides a convenient route to construct self-powered wavelength-selective photodetectors, which may find applications in light communication and biomedical engineering.