Pain is an important and complex protective phenomenon. Good postoperative pain relief is important as it alleviates patient suffering and aids a rapid, uncomplicated recovery. Narcotic analgesic drugs are a support in pediatric operation in this circumstance when a patient has “nothing per oral” status. A novel reliable electrochemical sensor is fabricated for direct and sensitive determination of nalbuphine (NB) and tramadol (TR) analgesic drugs based on cobalt oxide/ionic liquid crystal/carbon nanotubes modified carbon paste electrode in presence of sodium dodecyl sulfate (CNTILCCoCP-SDS). The effect of type of metal oxide on the catalytic activity of the sensor towards NB determination was evaluated. Nano‑cobalt oxide showed highest electro-catalytic activity, excellent conductivity, antifouling ability and charge transfer enhancement compared to other studied metal oxides. Under the optimized conditions, simultaneous determination of NB and TR in human urine using the proposed sensor was successfully achieved with sub-nano detection limits of 0.58nM and 0.62nM respectively. The practical analytical performance of the sensor was attained for determination of NB and TR in their pharmaceutical samples with satisfied recovery results. This sensor has great ability to be extended for electrochemical applications in assaying of many drugs.