An electrochemical sensor for nicotine determination in heated tobacco products (HTPs) was developed using biosynthesized AuNPs from Ceiba pentandra leaf extract. The biosynthesis process was optimized by investigating the effects of HauCl4 concentration, extract volume, reaction temperature, and time on the formation of gold nanoparticles (AuNPs). The biosynthesized AuNPs were characterized using various techniques, confirming their crystallinity, spherical morphology, and uniform size distribution with an average diameter of 19.8 ± 3.6 nm. The AuNP modified glassy carbon electrode (AuNP/GCE) exhibited enhanced electrochemical performance compared to the bare GCE, facilitating efficient oxidation of nicotine. The AuNP/GCE sensor demonstrated a wide linear range of 0.02–280 µmol L−1 and a low limit of detection of 0.01 µmol L−1 for nicotine determination. The sensor showed excellent selectivity towards nicotine in the presence of common interfering substances, with negligible responses (<5 % change) to uric acid, paracetamol, glucose, melamine, L-cysteine, and dopamine. The AuNP/GCE sensor's applicability was validated by analyzing nicotine levels in real HTP samples, with excellent recovery rates (97.6–102.4 %) and good agreement with the HPLC (R2 = 0.998). The biosynthesized AuNP-based electrochemical sensor offers a rapid, sensitive, eco-friendly, and cost-effective approach for nicotine determination in HTPs, providing a valuable tool for quality control and regulatory purposes.