The languages spoken by Moroccan Jews were an important part of their culture, reflecting their religious and ethnic identity and relations with other peoples. The mix of languages varied over time, depending upon historical events and who held political power.
The earliest Jewish immigrants (from about 500 BCE to 200 BCE) who accompanied the Phoenicians to Morocco brought with them their sacred language, Hebrew, and other Semitic languages, such as Phoenician (later called Punic) and Aramaic. The next wave of Jewish emigrants to Morocco (from 200 BCE to about 400 BCE) inhabited Roman outposts, speaking Greek and Latin. Throughout the Phoenician and Roman periods, some Jews moved westward from Egypt living among the Amazigh tribes in Tunisia, Algeria and Morocco and learning their language, Tamazight.
In the eighth century CE, Jews, as a protected people under Islam, accompanied Arabs in their westward drive from Arabia to Spain to convert rulers and peoples to Islam. Those remaining in Morocco spoke classical Arabic, the language used in Islam’s holy book, the Quran. From the 9th to 14th centuries, Jews of Fez, Sijilmassa, and what would later become Ceuta wrote classical Arabic in Hebrew characters.

By Jamila Buzaglo, Public domain, via Wikimedia Commons
In Spain, from the 10th – 15th century, Muslims and Jews spoke Arabic and Castilian (Old Spanish), depending upon whether they lived in Muslim or Christian-controlled areas. In addition, Jews spoke a dialect of Castilian, Ladino (Judeo-Spanish). Conflict with the Christians caused them to flee to Morocco and parts of the Ottoman Empire that extended from Turkey to Algeria. In 1391, riots in Seville caused Spanish-speaking Jews to flee to Debdou, in eastern Morocco. Beginning in 1492, Jews and Muslims fled Spain in response to the royal expulsion edict. Perhaps 20,000 Jews moved to Morocco, mainly to Fez and the North, where they spoke Ladino, Castilian and Arabic. From the 15th to 19th centuries, Jews in northern Morocco incorporated Arabic into Ladino so that the dialect evolved into what today is known as Haketia. Most Jews in Fez and Meknes spoke Haketia until the 18th century.

From National Library of Israel https://web.nli.org.il/sites/NLI/English/library/news/Pages/morroco_course.aspx
The Arabic language changed in Morocco. While there remain similarities to classical or standard Arabic, the Moroccan dialect is so different from the Arabic dialects of the Middle East that it cannot easily be understood by people of those regions. Within Morocco, a distinct Arabic dialect spoken by the Jews developed, particularly in the walled mellahs of cities and towns where Jews were forced to live until the 20th century. Judeo-Arabic is pronounced differently from Moroccan Arabic and includes some Hebrew words. Jews used the Hebrew alphabet to write it. Most Jews in central and southern Morocco spoke Judeo-Arabic as at least one of their languages, even in areas where the Tamazight language was spoken by their Muslim neighbors. Until the 20th century, most Moroccan Jews used Judeo-Arabic for letters, accounting books, historical documents and secular poetry.
Hebrew has been the language of the Jewish religion, both for the descendants of the Spanish exiles, Megorashim, and the Arab and Amazigh Jews, Toshavim. Among the most educated, Hebrew was used for Jewish court decisions, religious poetry, theology and Kabbalah.
Jews in the mountains and southern regions of Morocco developed their own dialect, Judeo-Tamazight. Since Morocco has three dialects of Tamazight, Jews adapted their own dialect to the one spoken in the region where they lived. Jewish teachers used Judeo-Tamazight, along with Hebrew, to teach students their Jewish heritage. Some religious documents were written in Judeo-Tamazight using Hebrew script. For some Jews, Judeo-Tamazight was their primary language. However, many Jews spoke Judeo-Tamazight with their neighbors and Judeo-Arabic among themselves. Some Jews who migrated from the rural areas to the towns and cities in the 20th century continued to speak Judeo-Tamazight. Almost speakers of this language emigrated to Israel in the second half of the 20th century.
Beginning in the 1860’s, increasing numbers of Moroccan Jews attended the French-speaking schools of the Alliance Israelite Universelle (AIU). With the advent of the French and Spanish protectorates in 1912, Jews had additional incentives to speak French and Spanish with representatives of the colonial powers as well as the Europeans who moved into Moroccan cities and towns. By the time of independence in 1956, many Jewish families had moved into the newly built “European cities” and spoke these languages at work and home.
The AIU had secularized Moroccan Jews by building their French language skills, but had not added classical or standard Arabic to their curriculum before independence. AIU graduates who sought to attend universities in Morocco were handicapped because they did not have adequate Arabic language skills. French language skills facilitated the emigration of many Jews to France in the 1960’s.
In 2020, the remaining Jews in Morocco are typically bilingual, speaking French or Spanish and Moroccan Arabic. Tens of thousands Jews in Israel speak Moroccan Judeo-Arabic, and some of their children are seeking to learn it as part of their effort to celebrate their Moroccan Jewish heritage.