Humpty Dumpty sat on a wall Humpty Dumpty had a great fall All the king's horses and all the king's men Couldn't put Humpty together again
There are various theories of the origin of Humpty Dumpty. One is from the name of a cannon during the English Civil War. It was on top of a tower. When the opposing force blew off the top of the tower, Humpty Dumpty fell to the ground. The King's (since they were on the Royalist side) footmen and cavalry tried to fix him, but failed.
In another theory, Humpty Dumpty referred to King Richard III of England, the hunchbacked monarch, whose horse was named "Wall". During the battle of Bosworth Field, He fell off of his steed and was said to have been "hacked into pieces".
(However, although Shakespeare's play depicts Richard as a hunchback, other historical evidence suggests that he was not.)
Humpty Dumpty may also refer to a Roman war machine called a Testudo used to cross moats and climb over castle walls. Humpty Dumpty refers to the turtle-like look of the machine and the noise of the wheels.
Another theory has Humpty Dumpty as medieval argot for short maladroits.