This, apparently, is Cockney rhyming slang for “not on your life” or “not bloody likely.” However, there are two versions.
In the first one, the slang goes this way: Nelly rhymes with smelly, which leads to smelly breath, breath leads to breathing to keep alive, leading to “not on your life.”
In the other, Nelly is short for “Nelly duff,” which is Cockney rhyming slang for puff. Here, puff means “life; span or length of life.’ The OED mentions the phrase “in all one’s (born) puff,” which means “in all one’s life,” and tends to be used in negative contexts.
Nelly and puff share a definition. They can both refer, according to the OED, to “an effeminate man.” Puff is the older word here, dating from the very early 20th century, whilst Nelly (also written nelly) goes back to the 1930s.
Duff has a number of senses. One of them appears in plum duff where it is just a regional pronunciation of dough. Another sense is “useless; rubbish; counterfeit,” once a common British word, and one which was taken to the US by Scottish settlers. So it may be that the two mildly disparaging words were put together just to make the rhyme.
Yet another possible source is the traditional song “Nelly the Elephant” and the full phrase was an expression about some event being about as likely as riding into town on somebody else’s elephant.
The name Nell or Nellie, was originally just an affectionate abbreviation for Eleanor or Helen. But, also, Nellie was a fairly common generic name for a lowly servant. Someone new in a factory or office would often have been instructed by watching some conscientious and not too clever person who knew the ropes, but who could be relied upon not to inculcate bad habits. In the US, the name gave rise to the derogatory “nervous Nellie” for an excessively timid person, and also “nice-nellyism,” to mean “excessive prudishness of speech or behaviour.”
There’s yet another Nellie expression, “Nellie Bligh,” that at various times has meant a lie, a fly, or (particularly in Australia), a pie. The most probable origin is the famous pioneering nineteenth century American woman journalist Elizabeth Jane Cochran. She took the pen name Nellie Bly from the title of a currently popular song by Stephen Foster. As the slang term “Nellie Bligh” is often so spelled, its recorders may have been influenced by William Bligh, famous as an officer on the Royal Navy vessel HMS Bounty.
Finally, Not On Your Nellie is a British sitcom that ran in 1974 and 1975. It starred veteran actress Hylda Baker as Nellie Pickersgill, a woman who moves to London to help run her ailing father’s Chelsea pub.
I’m glad my parents didn’t name me “Nellie.” The name has too much history for comfort.