A novel hierarchically nanoporous carbon (NPC) derived from Al‐based porous coordination polymer is prepared by two‐step carbonization method for immobilization of the Co3O4 in the application of the nonenzymatic biofuel cells and biosensors. The structure and morphology are characterized by scanning electron microscopy (SEM), transmission electron microscopy (TEM), high‐resolution transmission electron microscopy (HRTEM), and X‐ray diffraction (XRD). Brunauer‐Emmett‐Teller (BET) is to characterize the porous nature of the NPC, and X‐ray photoelectron spectroscopy (XPS) is to characterize the composition of Co3O4@nanoporous carbon (Co3O4@NPC). Without collapse in the high carbonization temperature (above 1600 °C), the NPC maintains the nanoporous structure and high specific surface area of 1551.2 m2 g−1. In addition, the NPC is composited with Co3O4 by hydrothermal method to form the Co3O4@NPC. When tested as the nonenzymatic electrocatalyst for glucose oxidation reaction (GOR), the Co3O4@NPC exhibits higher response to glucose, in which the current shifts up by 64 %, than pure Co3O4 in 0.1 M KOH. The limit of detection is 0.005 mM (S/N=3) and response time is within 3 s. The detection range can be divided into two sections of 0.02–1.4 mM and 1.4–10.7 mM with the sensitivity of 249.1 μA mM−1 cm−2 and 66.6 μA mM−1 cm−2, respectively. A glucose fuel cell is constructed with the Co3O4@NPC as the anode and Pt/C catalyst as the cathode. The open‐circuit potential of the nonenzymatic glucose/O2 fuel cell was 0.68 V, with a maximum power density of 0.52 mW cm−2 at 0.27 V. This work may contribute to exploring other nanoporous carbons for application in glucose fuel cells and biosensors.