Oxycodone is an opioid medicine that is widely prescribed for the treatment of the diseases that are accompanied with sever and chronic pains. In the recent decade, residual pharmaceutical compounds (especially antibiotics and analgesics) have begun to be considered as emerging environmental pollutants due to their continuous input and persistence to aquatic ecosystem even at trace concentrations. Besides, oxycodone is very addictive and at high dosages cause serious life-threatening side effects including bradycardia, circulatory collapse, respiratory depression and even death. In this respect, developing a rapid, simple and sensitive analytical method for the determination of oxycodone is very important. Therefore, in this study, overoxidized poly(4-aminophenol) was electrosynthesized on the surface of a glassy carbon electrode and its applicability for the measurement of oxycodone was investigated for the first time. The modified electrode was characterized by Fourier-transform infrared spectroscopy (FT-IR), cyclic voltammetry (CV) and square wave voltammetry (SWV) techniques. The obtained voltammograms showed a well-defined peak for oxycodone at +1.36 V (vs SCE). The influence of all of the effective experimental parameters on the signal intensity was investigated and optimized. Under the optimized conditions, the designed sensor exhibited two dynamic ranges (20-100 µM) and (100-1000 µM) with y = 0.0701x + 5.8033 (R2=0.9984) and 0.0146x + 11.519 (R2=0.9985) equations respectively. The values of limit of detection (LOD) and limit of quantification (LOQ) were 5.75 and 19.17 µM respectively.