Other suspects are being sought over the killings of the Danish and Norwegian hikers who were found dead on Monday with cuts to their necks, the interior ministry said.
The bodies were discovered in an isolated mountainous area 10 kilometres (six miles) from the tourist village of Imlil in the High Atlas range.
Imlil is a starting point for trekking and climbing tours of Mount Toubkal, which at 4,167 metres is the highest summit in North Africa.
The suspect was arrested in the former imperial city of Marrakesh, a tourist hub located at the foot of the mountains about 60 kilometres north of Imlil, and held in custody for questioning, the ministry said.
The Moroccan authorities described it as a "criminal act" but did not give further details about the circumstances of the murders.
Morocco publisher accused of 'sexual assault'
The Danish victim, Louisa Vesterager Jespersen, 24, "had her throat cut," her mother Helle Petersen was quoted by the Danish newspaper B.T. as saying.
Her family had warned her against going to Morocco "because of the chaotic situation," she added.
According to her Facebook page, Jespersen had studied in Norway to be a guide.
Norwegian media named the other victim as 28-year-old Maren Ueland.
"Her priority was safety. The girls took every precaution before going on this trip," her mother Irene Ueland told Norwegian broadcaster NRK.
Mutual Benefit: Morocco invited to invest in tourism
The two women studied at a university in southern Norway and had planned to travel together for a month, she said, adding that her last contact with her daughter was on December 9.
A Norwegian policeman from the embassy in Rabat is travelling to Marrakesh to act as a liaison between the authorities.
Security was stepped up in the region and hiking suspended following the discovery of the bodies, Moroccan media said.
"It's very bad for the region. There will undoubtedly be cancellations," a local guide, Hossein, told AFP from Imlil.
Tourism is a cornerstone of Morocco's economy and the kingdom's second-largest employer, after agriculture.
The sector accounts for 10 per cent of national income and is one of the country's main sources of foreign currency.
After several years of near-stagnation, Morocco welcomed a record 11.35 million visitors in 2017, exceeding the 11-million mark for the first time.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ