Phenolic antioxidants such as tert-butylhydroquinone (TBHQ) can prolong the shelf life of edible oils by delaying the oxidation process. The excessive use of TBHQ can damage food quality and public health, so it is necessary to develop an efficient TBHQ detection technique. In this work, nickel-aluminum double hydroxide (NiAl-LDH) was grown on glucose carbon spheres (GC), which formed porous carbon nanomaterials (named NiAl-LDH@GC-800) after pyrolysis at 800 °C. The successful synthesis of the material was verified by scanning electron microscopy, X-ray diffraction, and X-ray photoelectron spectroscopy. The obtained NiAl-LDH@GC-800 was dopped onto a glass carbon electrode to prepare an electrochemical sensor for TBHQ. The synergistic effect of porous carbon and Ni metal reduced from NiAl-LDH by high-temperature calcination accelerated the electron transfer rate and improved the sensitivity of the sensor. The prepared sensor showed a low limit of detection (LOD) of 8.2 nM, a high sensitivity (4.2 A·M−1), and a good linear range (20~300 µM) in detecting TBHQ. The sensor was also successfully used for TBHQ detection in edible oils, including chili oil, peanut oil, and rapeseed oil.