according to a few different sources it originated in the U.K. and it's a cockney thing. Riddled with old as dirt slang that would have no real meaning today.
This was the least time consuming explanation to read. Pop goes the Weasel nursery rhyme lyrics, origins and history
Something about not trusting the police and pawning your clothes.