Anionic surfactants are used in greater volume than any other surfactants because of their highly potent detergency and low cost of manufacture. However, they have not been used as templates for synthesizing mesoporous silica. Here we show a templating route for preparing mesoporous silicas based on self-assembly of anionic surfactants and inorganic precursors. We use aminosilane or quaternized aminosilane as co-structure-directing agent (CSDA), which is different from previous pathways1-10. The alkoxysilane site of CSDA is co-condensed with inorganic precursors; the ammonium site of CSDA, attached to silicon atoms incorporated into the wall, electrostatically interacts with the anionic surfactants to produce well-ordered anionic-surfactant-templated mesoporous silicas (AMS). These have new structures with periodic modulations as well as two-dimensional hexagonal and lamellar phases. The periodic modulations may be caused by the coexistence of micelles that differ in size or curvature, possibly owing to local chirality. These mesoporous silicas provide a new family of mesoporous materials as well as shedding light on the structural behaviour of anionic surfactants.