The original nursery rhyme has been dated all the way back to late eighteenth century England, though there is no definite source as to how it was conceived or what its meaning is. The rhyme has been altered over the centuries, but the most popular one to this day is as follows:
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
Humpty Dumpty appears on one of the pages of Mother Goose's magic storybook, standing on his wall and laughing. It eventually unnerves Mother Goose's pet goose to the point that it smacks Humpty Dumpty from its wall, causing him to shatter.
Humpty Dumpty makes a brief appearance when Alice returns to Underland via Looking Glass and upon exploring, she lands at a chessboard where a black knight chess piece frightens her, who accidentally knocking Humpty off the chessboard unaware, followed by the White King sending his white chess pieces to the rescue in a plan to put Humpty back together again (alluding to the nursery rhyme) and as Alice picks up a piece of him and apologizes to him, one of the black chess pieces grabs the piece to help put him together again while Absolem (in his butterfly form) warns Alice that the Hatter is in risk of dying, forcing her to go back to Underland and save his life.
In this Seven Dwarfs story that predates the Alice in Wonderland treatment of the character, Humpty Dumpty is featured. He runs to the Seven Dwarfs for help as his brother, Gumpty, has been kidnapped by Gustav the Giant.
Unbirthday Party with Alice in Wonderland
The concept arts of Humpty Dumpty from the feature Alice in Wonderland eventually got used in this 1951 comic book drawn by Al Hubbard.