The study, by a team from Cancer Research UK, is published by the British-based journal Nature.
Tamoxifen has played an essential part in slashing the death rate from breast cancer in advanced economies.
It is used in cases of so-called hormone-sensitive, or hormone-receptor-positive, cancer. These are tumours that are stimulated by exposure to the female hormone, oestrogen.
Tamoxifen is given to most women for five years after they have been diagnosed with cancer, but some patients develop resistance to the drug, which thus boosts the risk that the cancer will return.
How the drug works on the molecular level has been unclear until now.
In their paper, the investigators say tamoxifen uses a protein called Pax2 to "switch off" a gene called ErbB2. Located on breast cancer cells, ErbB2 opens the cell to exposure by oestrogen.
When ErbB2 remains switched on, though, resistance to tamoxifen occurs.
Understanding this failure opens the way to treatments that will bypass or reverse the Pax2 switch, the researchers hope.
"We knew that women developed resistance to tamoxifen, but previously our understanding of why this occurred could be compared with trying to fix a broken car without knowing how the engine worked," said lead researcher Jason Carroll of the organisation's labs in Cambridge, eastern England.
"Now we understand how all the engine parts operate, and we can try to make repairs."
Breast cancer is the commonest cancer to affect women, and is often dubbed a "silent killer" for the way in which it stealthily claims lives because it is diagnosed too late.
Cancer Research UK said that in Britain, more than 45,500 women were diagnosed with the disease each year, 80 percent of them in women over the age of 50. Most cancers are hormone sensitive.
The survival rate from breast cancer in Britain - as deemed by the five-year mark after diagnosis - now stands at more than 80 percent, compared with only 50 percent 30 years ago. Earlier diagnosis and smarter drugs, as well as access to surgery and radiotherapy, are the cause.