Photovoltaic effects in poly(3-hexylthiophene-2,5-diyl) (P3HT) have attracted much attention recently. Here, natively p-type doped P3HT nanofibers and n-type doped zinc tin oxide (ZTO) nanowires are used for making not only field-effect transistors (FETs) but also p-n nanoscale diodes. The hybrid P3HT/ZTO p-n heterojunction shows applications in many directions, and it also facilitates the investigation of photoelectrons and photovoltaic effects on the nanoscale. As for applications, the heterojunction device shows a simultaneously high on/off ratio of n- and p-type FETs, gatable p-n junction diodes, tristate buffer devices, gatable photodetectors, and gatable solar cells. On the other hand, P3HT nanofibers are taken as a photoactive layer and the role played by the p-n heterojunction in the photoelectric and photovoltaic effects is investigated. It is found that the hybrid P3HT/ZTO p-n heterojunction assists in increasing photocurrents and enhancing photovoltaic effects. Through the controllable gating of the heterojunction, we can discuss the background mechanisms of photocurrent generation and photovoltaic energy harvesting.