Prof Svanborg, an immunologist at Lund University in Sweden, made the chance discovery that the substance kills tumour cells when working on antibiotics.
She said: "We were looking for novel antimicrobial agents, and new breast milk is a very good source of these. During one experiment we needed human cells and bacteria to be present, and we chose human tumour cells for practical reasons.
"To our amazement, when we added this compound of milk, the tumour cells died. It was a totally serendipitous discovery."
The substance attacks cancer cells in numerous ways - first evading the cell's outer defences, then targeting the "power station" mitochondria and the "instruction manual" nucleus.
These actions cut off the cell's energy source and "programme" it to commit suicide, in a process called apoptosis.
Early trials in patients with bladder cancer show those injected with Hamlet start shedding dead tumour cells in their urine within days.
A full-scale trial pitting Hamlet against a placebo 'dummy drug' is now planned.