Like other opioids , e.g. diacetylmorphine ( heroin ) , morphine acts directly on the central nervous system ( CNS ) to relieve pain , and at synapses of the nucleus accumbens in particular . Like other opioids , such as oxycodone ( OxyContin , Percocet , Percodan ) , hydromorphone ( Dilaudid , Palladone ) , and diacetylmorphine ( heroin ) , morphine acts directly on the central nervous system ( CNS ) to relieve pain . Unlike the opioids , morphine is an opiate and a natural product .