Shepherd's pie most likely originated in the United Kingdom, in Ireland or Scotland. Although early cookbooks included similar meat pies of various kinds, the term "shepherd's pie" did not appear until the 1870s, around the same time that mince machines first became available.
Some form of shepherd's pie has been a staple of British, Irish and Scottish cuisines since at least the end of the 1700s, when potatoes first became widely accepted in the United Kingdom. The pie served as a convenient way to reuse leftover meat.
Variations with beef are called cottage pie, whereas shepherd's pie usually connotes lamb. In the United States, Ireland and English-speaking Canada, shepherd's pie often refers to any such meat pie with a mashed potato top crust.
Early versions included a pie dished lined with mashed potato in addition to a mashed potato top crust. A similar early Scottish version has a pastry crust top, and Cumberland pie is essentially the same but with a breadcrumb top crust. Pate chinois is the French Canadian version made with beef, corn and a mashed potato crust.
Many cuisines around the world contain some form of shepherd's pie. New Zealanders call their version the potato top pie. Argentineans and Chileans refer to it as pastel de papa. Cowboy Pie refers to an American version with beef and corn, peas, bell peppers or carrots and a mashed potato crust.