http://www.straightdope.com/mailbag/mhumpty.html
I have heard another explanation of the rhyme’s origin, from a friend in Colchester, in the south of England. It was taken from information at the town castle, and states that Humpty Dumpty was a cannon, originally placed on one of the castle’s towers, which then fell and could not be “put back together” by “all the king’s horses” or “all the king’s men”.
The earlier versions mentioned in the article:
“Cannot place Humpty Dumpty as he was before”
and
“Could not set Humpty Dumpty up again”
which I had not previously heard, actually seem to make more sense, in reference to a cannon, than to an egg.