Formaldehyde is susceptible to illegal addition to foodstuffs to extend their shelf life due to its antimicrobial, preservative and bleaching properties. In this study, a self‐supporting “nanosheet on nanosheet” arrays electrocatalyst with core‐shell heterostructure was prepared in situ by coupling NiCo layer double hydroxide with 2D ZIF derived Co‐nitrogen‐doped porous carbon on carbon cloth (Co‐N/C@NiCo‐LDH NSAs/CC). Co‐N/C nanosheet arrays act as a scaffold core with good electrical conductivity, providing more NiCo‐LDH nucleation sites to avoid NiCo‐LDH agglomeration, thus having fast mass/charge transfer performance. While the NiCo‐LDH nanosheet arrays shell with high specific surface area provide more active sites for electrochemical reactions. As an electrocatalytic sensing electrode, Co‐N/C@NiCo‐LDH NSAs/CC has a wide linear range of 1 μM to 13 mM for formaldehyde detection, and the detection limit is 82 nM. Besides, the sensor has been applied to the detection of formaldehyde in food samples with satisfactory results.