We report a novel method to in situ synthesise one-dimensional rodlike ZnO nanocrystals directly in the presence of a self-assembling diblock copolymer, poly(3-hexylthiophene)-b-poly(zinc methacrylate acetate) (P3HT-bbb-PZnMAAc), where the P3HT-bbb-PZnMAAc is acting as a molecular template for geometrical manipulation of rodlike ZnO nanocrystals and, meanwhile, as a precursor for ZnO nanoparticles. HRTEM and SAED reveal that rodlike ZnO nanocrystals are assembled by ZnO nanoparticles with almost the same orientation due to the dipole-induced interaction between adjacent ZnO nanoparticles. SEM images show that the rodlike ZnO nanocrystals are homogenously dispersed in the polymer matrix without obvious macrophase separation and its length can be controlled by adjusting the hydrolysis time. In the nanocomposites, as rodlike ZnO nanocrystals synthesized in a well-defined morphological confinement from the self-assembly of a diblock copolymer dispersed closely to P3HT chains with a high interface area, the photo-generated excitons are easy to separate into electrons and holes at the interfaces, resulting in the strong photoluminescence quenching of 70% observed in the P3HT/ZnO nanocomposite film hydrolyzed for 1 h. These results indicate that this type of P3HT/ZnO nanocomposite films are promising candidates for photovoltaic applications. The device based on P3HT/ZnO nanocomposite films hydrolyzed for 1 h yields a power conversion efficiency of 0.19% under AM 1.5G illumination from a calibrated solar simulator with an intensity of 100 mW cm−2.