The successful construction of porphyrin functionalized metallacycle in the confined cavity of mesoporous carbon FDU-16 (3⊂C) is presented in this study. Because of high dispersity of metallacycles within the mesoporous cavities, the stability and activity of porphyrin-containing metallacycles were obviously improved. For example, 1O2 generation efficiency of 3⊂C is ca. 6-fold faster than that of free metallaycles in solution. Thus, the resultant hybrid material has been successfully employed as a heterogeneous catalyst for photooxidation of sulfides.