A novel electroanalytical system was developed using polyaniline (PANI) functionalized ordered mesoporous carbon (CMK-3). Hydrophilic surface modification of CMK-3 is necessary and enables monomers to penetrate the pore channels of CMK-3, which makes it possible for the formation of PANI layers inside the pores of CMK-3 via in situ polymerization. The structures of the surface-modified ordered mesoporous carbon (m-CMK-3) and the PANI functionalized composites (CMK-PANIs) were characterized by X-ray diffraction, thermal gravimetric analysis, Fourier transform-infrared spectroscopy, transmission electron microscopy, and N2 adsorption measurements. The catalytic effect of the resultant CMK-PANI composite electrodes with various PANI loadings on the hydroquinone/quinine (H2Q/Q) redox reaction, was investigated. It was found that the CMK-PANI composite electrode with 25 wt% loading of PANI (CMK-PANI-1) has a higher electrochemical properties than both the m-CMK-3 electrode and the CMK-PANI composite electrode with 45 wt% loading of PANI. This high electrochemical properties is due to not only the relatively high specific surface area of 447 m2g−1 and pore volume of 0.3 ml g−1 and also nearly all the interior active sites are accessible for the electrolyte. Furthermore CMK-PANI-1 has also shown higher current values (Ip) in the cyclic voltammograms than the m-CMK-3 electrode. It is believed that the strategy may be used in fabricating other functional polymers inside mesoporous carbons with controlled pore channels for many applications, such as electrochemical sensors and biosensors with potential high performances.