In the presence of surfactant, the surface modified mesoporous SiO2 was formed by copolymerization of organosilane and silicon source or organosilane precursor. In this way, organosilane also becomes a part of mesoporous silica skeleton, which is essentially different from post grafting.