We prepared nanoporous NiO films from NiCl 2 in water/ethanol mixed solution, using a series of polyethyleneoxide–polypropyleneoxide–polyethyleneoxide (PEO–PPO–PEO) triblock co-polymers as template, and examined them as p-type NiO electrodes sensitized with a merocyanine dye. Triblock co-polymers with high PEO/PPO ratio leaded to three-fold higher photocurrent in comparison with low PEO/PPO polymers. Use of high PEO/PPO templates resulted in NiO membrane structure formed by uniformly distributed NiO nano particles with small interparticle voids, giving large surface area for dye adsorption, while low PEO/PPO templates resulted in larger void volume and less surface area. Photocurrent under simulated solar light was sum of the currents generated by NiO direct excitation and by dye-sensitization at spectra below 450 nm and from 450 to 590 nm, respectively.