Films of poly(3-hexyl thiophene) (P3HT):[6,6]-phenyl C61-butyric acid methyl ester (PCBM) were controllably exposed to CS2 vapor in a column with a linear solvent vapor pressure gradient. Changes in the morphology of the P3HT:PCBM thin film were monitored and correlated to the ability of this thin film to act as the active layer in an organic solar cell. The results show that the crystallinity and crystal size of the P3HT increase initially with solvent vapor pressure and annealing time, but longer exposure to solvent decreases P3HT crystallinity and photovoltaic efficiency. Neutron reflectivity indicates that the PCBM segregates to the Si substrate in the as-cast thin film, but distributes throughout the film with solvent annealing. The changes in crystallinity and the depth profile of the P3HT:PCBM mixture differ from those induced by thermal annealing. The structural variation with solvent exposure is correlated to photovoltaic function, demonstrating that the solvent annealing provides a window of optimum efficiency, which depends on solvent exposure. Moreover, the control of depth profile and structure should be generally applicable to a broad range of polymer-nanoparticle mixtures and thus these results provide fundamental information that can be used to control the depth profile, morphology and function of thin film nanocomposites.