Monitoring pharmaceutical drugs in various mediums is crucial to mitigate adverse effects. This study presents a chemical sensor using an oval-like zinc oxide (ZnO) nanostructure for electrochemical detection of nalbuphine. The ZnO nanostructure, produced via an efficient sol-gel technique, was extensively characterized using field emission scanning electron microscopy (FESEM), transmission electron microscopy (TEM), X-ray diffraction (XRD), UV-visible spectrophotometry, and fourier transform infrared spectroscopy (FTIR). A slurry of the ZnO nanostructure in a binder was applied to a glassy carbon electrode (GCE). The sensor's responsiveness to nalbuphine was assessed using linear sweep voltammetry (LSV), achieving optimal performance by fine-tuning the pH. The sensor demonstrated a proportional response to nalbuphine concentrations up to 150.0 nM with a good regression coefficient (R