A tris(bipyridine)ruthenium derivative with two terminal triethoxysilyl groups attached to one of the bipyridine ligands has been synthesized and used in combination with TEOS for the preparation of a tris(bipyridine)ruthenium- containing mesoporous silica, using CTABr as a structure-directing agent, under basic conditions at 100 °C. The resulting solids exhibited XRD patterns, isothermal gas adsorption and electron-microscopy images characteristic of hexagonal mesoporous silica, while the presence of tris(bipyridine)ruthenium complexes at the walls is manifested by the orange coloration of the solids and the optical spectra of the material corresponding to tris(bipyridine) ruthenium(ii). The removal of the structure-directing agent without damaging the complex or the mesoporous structure of the pores was done by exhaustive solid-liquid extraction. As-synthesized mpRu exhibits photovoltaic (V <inf>OC</inf> = 140 mV, I<inf>SC</inf> = 2.6 A) and electrochemiluminescence activity (λ<inf>max</inf> = 610 nm), the presence of CTABr plays a positive role in the activity by promoting intraparticle charge migration. In contrast, for an analogous material prepared under the same conditions but in the absence of the structure-directing agent and having a low surface area, the amorphous structure did not exhibit significant a photovoltaic or electrochemiluminescence response. This result exemplifies the benefits of having porosity and accessibility to the photoactive metallic complexes. © The Royal Society of Chemistry.