The town’s history dates back to 1500 B.C., when Phoenicians occupied a site called Silis or Zilis, Zilil which is being excavated at Dchar Jdid, some 12 km NE of present Asilah; that place was once considered to be the Roman stronghold Ad Mercuri, but is now accepted to be Zilil. The town of Asilah itself and walls were first built by the Berbers in the 9th century to secure the coast from future Vikings raids, and partly constructed by the Idrisid dynasty, and Cordoban caliph Al-Hakam II rebuilt the town in 966. The Portuguese conquered the city in 1471 and built its fortifications, but it was abandoned it because of an economic debt crisis in 1549. In 1578, Sebastian of Portugal used Asilah as a base for his troops during a planned crusade that resulted in Sebastian’s death, which in turn caused the Portuguese succession crisis of 1580. In 1589 the Moroccans briefly regained control of Asilah, but then lost it to the Spanish.
In 1692, the town was again taken by the Moroccans under the leadership of Moulay Ismail. Asilah served then as a base for pirates in the 19th and 20th centuries, and in 1829, the Austrians punitively bombarded the city due to Moroccan piracy.
From 1912 to 1956, it was part of Spanish Morocco. A major plan to restore the town was undertaken in 1978 by its mayor, Mohamed Benaissa. Benaissa and painter Mohamed Melehi were instrumental in organizing an art festival, the International Cultural Moussem of Asilah, that starting in 1978 began generating tourism income. It is credited with having promoted urban renewal in Asilah, and is one of the most important art festivals in the country. It played a role in raising the average monthly income from $50 in 1978 to $140 in 2014. The festival features local artwork and music and continues to attract large numbers of tourists.
Asilah is now a popular seaside resort, with modern holiday apartment complexes on the coast road leading to the town from Tangier. The old neighborhoods are restored and painted white, and the wealthy from Casablanca have their weekend getaways here.
While tourism dominates, Asilah is said to offer a good introduction to Morocco. It hosts annual music and arts festivals, including a mural-painting festival. Thursday is market day. The International Festival, held in August, features jazz and Moroccan music as well as art exhibitions.
Many of the houses of Asilah feature mashrabiya (oriel windows). The main cultural center is the Centre Hassan II des Rencontres Internationales, which hosts festivals in the summer.