To eat humble pie means to eat a figurative serving of humiliation, usually accompanied by forced submission, an apology or a retraction. But why is this figurative food a pie?
This goes back the 17th century when poor English folks are a pie made up of the innards of a deer (heart, liver, kidney and other offal.) These inexpensive innards were combined with apples, currants, sugar and spices. Servants often dined on this while their masters dined on the venison.
Some etymologists claim this pie was called "numble pie". Others claim it stemmed from "umble", a reference to umbilical cord, yet another part of the offal. Whichever the case, the pie eventually became "umble pie". And since after the Middle Ages, many English words were pronounced without the initial "h" (e.g., hotel), the dish began to be spelt as "humble pie". This was a fitting spelling as it was a poor man's dish.
To add colour to the discussion, the word humble comes from the Latin word for earth, humus. We usually think of humble folks as being "down to earth" so it's not hard to imagine a pie filled with dirt that you have to eat when you are humiliated.

