Mesoporous silicon oxynitride and nitride were prepared through nitridation of various mesoporous silica, MCM-41, -48, and SBA-15 with ammonia in a plug flow reactor. The nitrogen contents were dependent on the reaction temperature and the amount of ammonia supplied per sample weight. The appropriate nitridation temperature was 1273 K and the maximum contents of nitrogen were 35-39 wt % which correspond to 88-98% of that of Si3N4. Various physicochemical characterization of the resulting silicon (oxy)nitiride indicated that the pore structures were not changed upon the nitridation though the lattice constants and the pore diameters decreased and the wall thickness increased. The nitridation mechanism was discussed on the basis of 29Si MAS NMR and XPS experiments.