Getting to Morocco from Spain is quite easy, with lots of ferries to Morocco from a variety of ports. But journey times vary drastically (as do prices) and travelers always have to bear in mind where in Morocco they're going to end up.
It is most likely that your first destination in Morocco, if not Tangier, would be Fes, so we've included travel options for getting to Fes on your first day in Morocco. Marrakech would be quite far to travel on your first day. An alternative first destination in Morocco is Chefchaouen.
If you don't want the hassle of planning a journey to Africa by yourself, there are plenty of guided tours of Morocco from Spain that you could take.
Cities in Spain With Ferries to Morocco
- Tarifa: The southern-most tip of Spain and the European capital of windsurfing. Has regular daily ferries to Tangier.
- Algeciras: A port city which has regular daily ferries to Tangier and the Spanish enclave of Ceuta.
- Gibraltar: A British enclave in Spain which has ferries to Tangier on Friday afternoons.
- Barcelona: Not so regular and quite a long trip, but you can get a ferry to Tangier.
- Almeria: In the south-eastern corner of Spain (as opposed to the other ports here, which are all in the south-west) with ferries to Al Hoceima, Nador and the Spanish enclave of Melilla.
- Málaga: The biggest city on the Costa del Sol offers one ferry a week to Tangier.
Tarifa, Gibraltar, or Algeciras to Tangier
Tarifa to Tangier is the best ferry route to Morocco in the congested Strait of Gibraltar. There are five ports on the Spanish side (Tarifa, Algeciras, Gibraltar, Malaga, Almeria) and four on the Moroccan side (Tangier, Tangier Med, Ceuta and Melilla), with eight routes connecting them. A list of routes can be found here.
Tarifa to Tangier is the best of these as it has the most voyages per day, some of the cheapest tickets and you arrive in Tangier city itself. Tarifa is also a nicer place to visit than the other ports on the Spanish side.
Getting from Tangier to Fes takes four and half hours by train. Consider staying the night in Tarifa and getting an early ferry. Find more information on the Moroccan Trains Official Website and the Moroccan Buses Official Website.
Malaga or Almeria to Melilla
Convenient if you're already in Malaga (or making the trip from Granada), especially if you can get the overnight Trasmediterránea ferry, as this arrives in the morning and allows for timely onward travel to Fes or other cities in Morocco. Unfortunately, the day ferry leaves you to arrive inconveniently late in Melilla.
Melilla is not Morocco, but a Spanish enclave, so transport is tricky. You have to take a taxi to Nador, the nearest Moroccan city. From there, there are a couple of trains per day but your options are limited as some depart very early and others arrive very late. The bus situation is even worse.
Almeria to Nador or Melilla
If you're traveling from the east coast of Spain to get to Morocco, Almeria is your most convenient port. There are three ferry companies offering a variety of routes (on different days) from Almeria to Nador, though getting to Almeria in time for the ferry may require a night's stay in the city.
You can also travel from Almeria to Melilla, but this leaves you not in Morocco but in a Spanish enclave. Better to arrive in Nador.
Barcelona to Tangier
If traveling from Barcelona to Morocco, you are better off flying or visiting the south of Spain before crossing to Morocco. But it is possible to take a GNV ferry all the way from Barcelona to Morocco, though the timetable is infrequent and irregular.