Abstract A mesoporous polymer/silica hybrid was fabricated by a surfactant-mediated sol–gel method. Under our experimental conditions, acrylonitrile (AN) monomer was located at the exterior of micelles and the sol–gel reaction of tetraethoxyorthosilicate (TEOS) proceeded concurrently with the polymerization reaction of the AN monomer. In other words, the micelle/polyacrylonitrile/silica precursor was synthesized through the radical polymerization accompanied with a hydrolysis/condensation single reaction in a reaction system. This is a unique characteristic of our methodology, which embraces the concept of ‘micelle templating’. The pore diameter of the mesoporous polymer/silica hybrid could be tuned by varying the spacer length and concentration of surfactants. Furthermore, compared with conventional mesoporous carbons, the carbonized mesoporous polymer/silica hybrids displayed an enhanced electrical performance favorable for use as a supercapacitor.