The Catalan giants will travel to the north African country for their second pre-season warm-up match, in which they will face a squad of local players
The game, which will be contested against a selection of local players led by Rachid Taoussi, is scheduled for July 28, and will be the Catalans' second pre-season friendly after an encounter with Hamburg on July 24.
"We have more than 50,000 supporters in Morocco with four Barcelona fan clubs and thousands of followers in this country on Facebook," Barca vice-president Jordi Cardoner told reporters.
"Our desire is to put on a football show but also go further."
Spanish media reports claim Barca will be paid €1 million for visiting the north African country.