In this work, a screen‐printed carbon electrode (SPCE) was modified with a cobalt/porous silicon (Co@PSi) nanocomposite powder to develop a nonenzymatic sensor for the detection of hydrogen peroxide. The Co@PSi nanocomposite was synthesized through the chemical reaction between silicon powder in a HF/HNO3 solution and cobalt cations. In this process, cobalt nanoparticles were anchored on the porous silicon. The structure and morphology of the synthesized nanocomposite were investigated by X‐ray diffraction, Fourier transform infrared spectroscopy, X‐ray photoemission spectroscopy, energy dispersive X‐ray spectroscopy, and field‐emission scanning electron microscopy. The constructed nonenzymatic, screen‐printed sensors based on the Co@PSi nanocomposite showed perfect electrocatalytic oxidation response to hydrogen peroxide over the range 1–170 and 170–3,770 μmol/L with the limit of detection of 0.8 μmol/L. In addition, the Co@PSi‐SPCE sensor exhibited good selectivity for the determination of H2O2 in the presence of common interfering species including glucose, ascorbic acid, uric acid, dopamine, nitrate, and nitrite ions. The constructed electrochemical sensor was successfully used for the determination of H2O2 in real samples.