Oxycodone, often used as an analgesic, is a potent opioid. While its effectiveness has been proven in the control of moderate to acute pain, excessive use of oxycodone imposes heart failure, heart palpitations, reduction of red blood cells, bone pain, and even death. Therefore, monitoring the oxycodone concentration in blood is vital for emergency care. For this purpose, a novel electrochemical sensor was designed based on a glassy carbon electrode modified with mesoporous g-C 3 N 4 (M-C 3 N 4 ), carbon nano-onions doped with nitrogen (N-CNO), and gold nanoparticles. At first, the SEM and XRD techniques were employed to characterize prepared M-C 3 N 4 and N-CNO samples. The electro-oxidation behavior of the oxycodone was evaluated by cyclic and differential pulse voltammetric methods. Based on the influence of the potential scanning rate and solution pH on the voltammetric response of oxycodone oxidation, a redox mechanism was proposed. A 16 nM detection limit was acquired for the oxycodone analysis with a linear response in the 0.05-150 µM range. This sensor showed a remarkable ability for oxycodone detection in plasma samples. The long-term stability, superior selectivity, and reproducibility of this sensor prove its ability to measure oxycodone accurately and precisely in authentic spices. Keywords Oxycodone, Electrochemical sensor, Mesoporous g-C 3 N 4 , N-doped, Carbon nano-onions Opioid therapy is usually employed to treat severe pain, including post-surgical pains, cancer-related aches, and chronic pain 1 . Oxycodone (6-deoxy-7,8-dehydro-14-hydroxy-3-O-methyl-6-oxomorphine), one of the semi-synthetic opioids, is synthesized from the alkaloid thebaine with analgesic activity like morphine 2,3 . This drug is a potent pain reliever due to its remarkable analgesic effect and good tolerance. However, the dangers of oxycodone usage are increasing anxiety among medical professionals, primarily when it has been used for a long time 4 . Oxycodone can cause acute adverse effects, especially in high doses, such as weakness, slow heart rate, or weak pulse, the risks of addiction and misuse, and death 5,6 . An average of 5526 deaths were recorded annually from 2011 to 2016 due to oxycodone 7 . Therefore, rapid and accurate detection and quantification of oxycodone concentration is vital to monitor its correlation to side, toxic, and therapeutic effects and diagnostics of a possible overdose in emergency care.There are available techniques for oxycodone analysis in biological systems, namely gas chromatographymass spectrometry (GC-MS) 8,9 and high-performance liquid chromatography coupled mass spectrometry (HPLC-MS) [10][11][12] . Despite the good accurate results, these techniques are costly, time-consuming, and require a skilled operator and laborious sample preparation procedures. Also, methods based on immunoassays are commercially applied for oxycodone detection, but the reaction of most immunoassays to oxycodone is poor and may result in false-negative results 13,14 . Recently, sensors based on electrochemical met...