Hierarchically porous N and S co-doped carbon was prepared by using 2,5-dihydroxy-1,4-benzoquinone as the carbon source, thiourea as the N and S source, and SiO2 particles as the template. Using the material as the catalyst, oxidative coupling of silanes with alcohols was conducted for the first time under metal-free conditions.