Defect engineering has become an effective way to improve the surface performance of nanoelectrochemical catalysts. In this article, the ultrathin defect-rich Co(OH) 2 nanosheet arrays in situ grew on carbon cloth (U-D-Co(OH) 2 NSA/CC), which was synthesized by etching a metal−organic framework at room temperature. The physical and chemical properties of the obtained U-D-Co(OH) 2 NSA were characterized by X-ray diffraction, transmission electron microscopy, and X-ray photoelectron spectroscopy. It is an efficient electrode for detecting glucose and formaldehyde under alkaline conditions. As a glucose and formaldehyde sensor, it exhibited superior electrocatalytic activity, for instance, shorter response time (<5 s), limit of detection (LOD) of 0.32 μM and 0.57 μM (S/N = 3), and response sensitivity of 6759.0 μA mM −1 cm −2 for glucose and 2444.0 μA mM −1 cm −2 for formaldehyde with outstanding reproducibility and selectivity, respectively.