Supported mesostructured thin films are of major importance for applications in optical, electrochemical and sensing devices. However, good performance is restricted to mesostructured phases ensuring good accessibility from the film surface, which would be straightforward with cylindrical pores oriented normal to the underlying support, but this remains challenging. Here, we demonstrate that electrochemistry is likely to induce self-assembly of surfactant-templated (organo)silica thin films on various conducting supports, homogeneously over wide areas. The method involves the application of a suitable cathodic potential to an electrode immersed in a surfactant-containing hydrolysed sol solution to generate the hydroxyl ions that are necessary to catalyse polycondensation of the precursors and self-assembly of hexagonally packed one-dimensional channels that grow perpendicularly to the electrode surface. The method is compatible with controlled and localized deposition on heterogeneous supports, opening the way to electrochemically driven nanolithography for designing complex patterns of widely accessible mesostructured materials.