The royal couple visited the sandwich shop Social Bite, which helps homeless people across Scotland, during their first official joint visit to the country.
While one quarter of the cafe chain’s staff is made up of people who were once homeless, the enterprise also hands out 100,000 food and drink items to homeless people each year.
Harry asked the founders of Social Bite when they would be bringing the coffee shops “down south”.
Meghan told the staff in the kitchen she wanted to work there because it seemed “fun”.
The couple - who are set to marry in May - are the latest in a long line of high-profile visitors to the cafe.
While Hollywood A-lister George Clooney stopped by in 2015, leaving a $1,000 donation, Labour leader Jeremy Corbyn bought meals for two homeless people when he visited the Glasgow branch a month earlier.
Harry and Meghan called in at the coffee shop during their first official joint appearance in Scotland, which began with a visit to Edinburgh Castle.
The duo spent several minutes speaking to people in the large crowds which had gathered on the city’s streets to mark the royal visit, despite the bitter weather.
They later attended the firing of the castle’s iconic One O’Clock Gun.
Harry and Meghan are set to round off their trip with a charity reception at the Palace of Holyroodhouse to celebrate youth achievements as part of Scotland’s Year of Young People 2018.
The Edinburgh trip follows official visits to Nottingham, Brixton in London and Cardiff.