Copper nanoparticles embedded in porous carbon composite (Cu-PC) were prepared for the electrochemical detection of glucose and H2O2 via one-step carbonization of copper 1, 3, 5-benzenetricarboxylate (HKUST-1). The structure and chemical constitution of the composite were studied carefully by various characterization techniques. The results showed that the fine porosity and the uniformly distributed copper nanoparticles of octahedral Cu-PC obtained at 800°C (Cu-PC-800) facilitate the electron and mass transfer and make it an excellent sensor for both glucose and H2O2. As for glucose, the detection linear range is 0.5 ∼ 3850 μM, and the detection limit is 0.23 μM. Meanwhile, Cu-PC-800 can efficiently detect H2O2 in an alkaline solution with a wide linear range (5 ∼ 4600 μM), and a low detection limit of 1.9 μM. Furthermore, the fabricated Cu-PC-800 sensor achieved the determination of glucose and H2O2 in human serum and hydrogen peroxide bacteriostatic lotion, respectively.