The chemical reactions and pathways involving morphine, 17-methyl-7,8-didehydro-4,5alpha-epoxymorphinan-3,6alpha-diol. Morphine is a highly potent opiate analgesic psychoactive drug obtained form the opium poppy, Papaver somniferum.