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!
Nursery rhyme origin
It is a very old rhyme and is known throughout Europe in very much the same form.
It’s possible however that ‘Humpty Dumpty’ refers to a powerful cannon used during the English Civil War (1642-49). It was mounted on top of the St Marys at the Wall Church in Colchester defending the city against seige in the summer of 1648 which fell ‘off the wall’ and couldn’t be mended.

I was always told that Humpty Dumpty was about an English king who was hunchback . The egg referred to him–is that so?
Forget about the egg Agnes, as That was an invention by Lewis Carrol in Alice. The great, and supposedly rotund cannon was first mentioned in Bristol. It was later transported to Colchester to sit on the Roman wall and the church. During those times an over-weight person was often called an ‘Humpty-Dumpty’.
I believe the king you refer to was Richard the Third. Current research points to the fact that his so called deformity was a piece of propaganda and this was further exaggerated by William Shakespeare.