There are buses and grand taxis going to Essaouira from Marrakesh. From the Airport you can take a taxi to Gare ONCF (the trainstation). This is the place where the Supratours buses and grand taxis to Essaouira depart from.

From Marrakesh, you can take the Supratours bus to Essaouira. Buses run regularly throughout the day, with departures starting from 08.00 and the last at 19.00. It’s advised to book your ticket at least one day, in advance. You can’t buy ticket outside of Morocco. Ticket costs 80-110 ie. Luggage costs 5dh per item. The bus ride will take about 3 hrs
Grand Taxis from Marrakesh to Essaouira run during daytime and go whenever they are full.