Harry and Meghan will travel to the North African country on February 23 and are expected to carry out official engagements over the following two days.
The duchess is heavily pregnant but is apparently able to take part in the overseas visit.
Kensington Palace said in a short statement: “The Duke and Duchess of Sussex will visit Morocco from Saturday 23rd February to Monday 25th February 2019. This visit is at the request of Her Majesty’s Government.
“Full details of the visit will be announced in due course.”
Meghan and Harry are following in the footsteps of the Prince of Wales, who carried out a major tour of Africa last year visiting Ghana, Nigeria and the Gambia.
In the years following Britain’s 2016 referendum decision to leave the EU, the royal family made a string of visits to Europe, helping to renew and strengthen the UK’s ties with the continent as the Brexit process progressed.
The monarchy uses what has been termed “soft diplomacy” to promote the UK brand whenever they travel abroad.
It now appears part of the focus of overseas royal tours may be on Africa, which the Prime Minister has already described as having “incredible potential”.
Speaking last year ahead of a trade mission she made to South Africa, Nigeria and Kenya, to bolster Britain’s post-Brexit fortunes, Theresa May said: “A more prosperous, growing and trading Africa is in all of our interests and its incredible potential will only be realised through a concerted partnership between governments, global institutions and business.
“As we prepare to leave the European Union, now is the time for the UK to deepen and strengthen its global partnerships.”
Morocco is a parliamentary constitutional democracy but is effectively ruled by King Mohammed VI, who made some concessions following the 2010 Arab Spring.
Details of the visit have not been released yet but the trip is likely to see Meghan and Harry meet the king, the country’s prime minister Saad-Eddine El Othmani, and visit major tourist attractions.