Ferry to Spain (Port Tanger Med)
The new port, Tanger Med, is situated some 40 km east of the city and there are ferries to Spain (Algeciras) several times a day (less frequently to Barcelona and Italy). From the big roundabout in Tanger (Place Jamia el Arbia) walk about 4 kilometers towards national road N2 (follow the Tanger Med sign). After a big flyover bridge there is a bus stop where you can hitch a short ride to a toll booth that takes you to the highway A4 (not too much traffic but if you just keep walking towards the highway someone stops). Alternatively, get to the national road N16 (the beach road following Avenue d'Espagne).
When you get to the terminal, ask for a boarding card from one of the booths and fill it. Then waltz to the X-ray and someone probably asks for your ticket. Explain that you are a hitchhiker and that the trucks are allowed to have one passenger apart from the driver. Be prepared for lengthy conversation though. Smile. When I did it (March 2012) port authority absolutely didn't want let me in without a ticket (they sent me to the other truck entrance where they resent me back again). Ihad to enter by force, didn't care about them and went straight to police, custom office on the right after the entrance. There, being european, explaining, blablaing and so on i could enter
Once you are done with the formalities a minibus will take you to down to the port. Moroccan drivers are your best choice. Just convince them that you don't have drugs with you (Arabic sign "I have no drugs" makes them smile). Explain that all they have to do is to take you into the ferry and in Spain you will walk out of the ferry by yourself.
It might take a while but eventually you will get a ride to the ferry. Then you just go and have a nice meal with the driver.
Just before reaching Algeciras you should try to hitch a ride out of the port (otherwise be prepared for a long walk).
Two hitchhikers managed to do it from the truck gate in April 2013. it was very difficult, they weren't sure what was happening most of the time, and don't think it would be very easy to repeat. but it is possible! Full story in the discussion section.
(March 2012) Impossible. Because of the way is longer (they told me impossible more than 8 hrs, to barcelona is about 24 and genova 48) they ask documents, driving license and a 100E ticket for the codriver that's why all companies just pay for one driver. I tried all but refused. 'Fedecicco'
From the main exit of the port, follow the main road (the only one that trucks can run on). You'll see a sign reading first "Toutes directions", and "Tetouan", and then "Tetouan, Rabat". After a walk of some 2 km you'll reach a large roundabout. There is plenty of room for cars to stop, though you'll continually have to wave taxis off.
For Chefchaouen, you can use the direction Tetouan (the M2 motorway runs south along this route), though you'll most likely have to be dropped off in Tetouan and hitch from there.
For going to Rabat, another option is to take a train to Asilah, the first stop south of Tangier. From there it takes about 30 minutes to walk to the highway. Ask for the Afriquia gas station and you'll find plenty of cars and trucks there.
For the airport, take bus 9, 9b or 9c, which goes from near the medina. You can catch the 9b and 9c at place Kouweit and the 9 at Mabrouk. They all are not so frequent (go every half an hour/hour), so be prepared to wait. The bus journey takes only 15 minutes, but none of them go directly to the airport. They only pass by it on the main road. Get off the bus after the Metro store and than you'll have 10 more minutes to walk.