A mesocellular silica–carbon nanocomposite foam (MSCF) is designed for the immobilization and biosensing of proteins. The as-prepared MSCF has a highly ordered mesostructure, good biocompatibility, favorable conductivity and hydrophilicity, large surface area, and a narrow pore-size distribution, as verified by transmission electron microscopy (TEM), IR spectroscopy, electrochemical impedance spectroscopy (EIS), nitrogen adsorption–desorption isotherms, pore size distribution plots, and water contact angle measurements. Using glucose oxidase (GOD) as a model, the MSCF is tested for immobilization of redox proteins and the design of electrochemical biosensors. GOD molecules immobilized in the mesopores of the MSCF show direct electrochemistry with a fast electron transfer rate (14.0 ± 1.7 s–1) and good electrochemical performance. Based on a decrease of the electrocatalytic response of the reduced form of GOD to dissolved oxygen, the proposed biosensor exhibits a linear response to glucose concentrations ranging from 50 μM to 5.0 mM with a detection limit of 34 μM at an applied potential of –0.4 V. The biosensor shows good stability and selectivity and is able to exclude interference from ascorbic acid (AA) and uric acid (UA) species that always coexist with glucose in real samples. The nanocomposite foam provides a good matrix for protein immobilization and biosensor preparation.