MgO-templated porous carbon (MgOC) was developed for D-fructose dehydrogenase (FDH) electrodes. MgOCs with an average pore diameter ranging from 10 to 100 nm were used in this study. FDH adsorbed on a MgOC electrode exhibited significant catalytic currents for D-fructose-oxidation without a redox mediator. When the pore size of MgOC was much larger than the size of FDH, a sufficient amount of FDH was adsorbed in the mesopore on and even inside the MgOC structure. In contrast, when the pore size of MgOC was comparable to the size of FDH, the catalytic current depended only on the amount of enzyme adsorbed in mesopores formed at the surface of the carbon particles; however, an enhanced thermal stability of FDH was observed. Thus, FDH was stabilized through encaging in carbon mesopores with a size comparable to that of the enzyme.