We demonstrate a solution-based method to create vertical nanoporous structures of semiconducting polymer poly(3-hexylthiophene) over large areas by taking advantage of the spontaneous phase segregation between poly(3-hexylthiophene) and polystyrene deposited from a single solution and, in a second step, removing polystyrene by selectively dissolving it. Nanoporous films with pore diameters which can be tuned down to 120 nm are produced by varying the composition. The potential of the method is further demonstrated by fabricating fully operational solar cells after deposition of [6,6]-phenyl-C61-butyric acid methyl ester from an adequate solvent. Under optimized conditions, the devices based on nanostructured thin films exhibit enhanced efficiencies with respect to graded bilayers and bulk heterojunction organic photovoltaic devices. We relate the increase in fill factor observed in the nanostructured devices to changes in the orientation of poly(3- hexylthiophene) chains induced by nanoconfinement and self-assembly with polystyrene resulting from this simple solution process without the use of any elaborate chemistry or soft lithography. © 2012 The Royal Society of Chemistry.