Updated Summer 2020
See also: Documents and Port Immigration
Most travellers from the UK heading to Morocco in the cooler months take the ferries from Portsmouth to northern Spain: Bilbao or better still Santander. When you add up tolls and fuel and time across France it works out the same price for less driving or riding.
The Brittany ferries on this route are well-equipped cruise ships with plenty to occupy you over ~22 hours at sea, while doing a great job of smoothing the voyage across the Bay of Biscay. In January 2018 Brittany announced a new line between Cork and Santander, twice weekly from April to November.
From Santander to Algeciras (the most-used port) is about 1000km, and the empty and fast network of roads west of Madrid (A67, A62, A66 and A381 – right) can get you between the two ports in one long day if you wish. The only short section of toll (peaje) is south of Seville.
On a motorcycle, from the UK you can save at least two days each way but getting it trucked to a warehouse near Malaga. I used Fly and Ride in 2017. I delivered my bike all loaded up to a warehouse near Gatwick, then flew in and picked it up an hour’s walk from Malaga airport a week later. It cost £720, which to me worked out a bit less than the effort of ferrying and riding a 250 to Algeciras. I’ve since used removal companies from £420 one way. See this thread.
Now that Tan Med port is so easy, few go via ‘Tangiers City’ or the nearby Spanish enclave of Ceuta (Sp), although from Alicante, ferries to Melilla enclave (Sp) are often much cheaper than adjacent Nador. The payback can be that on the Spanish side of the land border with Morocco you’ll have annoying ‘helpers’ offering their services. They’re just looking for a tip at the end of it, but on a quiet day, you can manage without them.
Moroccan port maps