Driving can be a good option for independent travel in Morocco. The country is comparatively easily accessible by car ferry from Europe, and car rental is readily available. There are also public transport options between cities, and hiring a taxi for a day of sightseeing is not unheard of so most people don't need to drive.
The main road network is in good condition but due to the lack of dedicated cycling lanes and pedestrian paths in all but the largest cities, they are shared by many cyclists, pedestrians and horse-drawn vehicles.
Roads have a good surface, although some are very narrow, in most cases only one narrow lane in each direction. Many roads in the south marked as sealed actually have only a central strip, one lane wide, sealed with wide shoulders to be used every time you meet oncoming traffic and this is a sensible economic solution in these areas of sparse traffic and long straight roads - except when you can not see oncoming traffic because of windblown dust!
The main cities are connected by toll expressways still being extended.
Road signs are in Arabic and French and the traffic law is as in much of Europe (i.e. you give way to the right). This means that traffic on a roundabout gives way to that entering unless indicated otherwise by yield-signs at the entrances to the roundabout. Be very careful as many drivers respect signs only if a policeman is nearby. The speed limit is enforced especially the 40 km/h in towns and on dangerous intersections where fines are imposed on the spot. General rule is that vehicles larger than yours should be given a priority: trucks, buses and even grand taxis.
Morocco roundabouts have contrarian and inconsistent rules where some require vehicles in the roundabout to give way to approaching vehicles, while some others follow the norm where vehicles entering roundabout give way to those already in the roundabout. Do not expect other vehicles to follow rules.
Rental firms abound in the large cities. Most worldwide rental networks have their offices in Morocco. Also there are several local rental companies (5-7 have representative offices in Casablanca airport). They offer lower prices, but be sure to check the vehicle's condition, spare tyre, jack, etc. Local companies may be less proficient in English—but if you are ready for a higher risk, when you rent in an airport try to negotiate with them first; if failed you always have worldwide rivals to go next. Tips which local agency to use are best sought from expats who live in the area because they understand your expectations from experience and most probably don't have anything to gain from sending you to some sketchy agency. Local agencies usually require you to have a working phone.
Multinational companies seem to easily share cars with each other (although prices and service level may vary), so if your company of choice doesn't have what you need they may ask from another company.
Check where you can drive - some rental companies won't allow travel on unmade roads.
Some tour operators will arrange for you to hire a 4x4 or SUV with a driver/guide, and offer customised itineraries, including advanced booking in hotels, and riads.
When coming into Tangier by car, be careful of hustlers on motorbikes who will ride alongside you and attempt all manner of dodginess.
You can come by car by ferry from Algeciras and Tarifa in Spain or through the Spanish enclave of Ceuta (reached by ferry from Algeciras and ports in Spain). The ferry crossing varies from 1 hour to 3 hours. Shortest and cheapest will be from Tarifa to/from Tangier taking around 40 min. Tarifa is probably the most laid-back option as far as ports are concerned.
It's possible also to enter Mauritania by car from Dakhla. Most countries' citizens need a visa to enter Mauritania which is available at the borders for a fee or at the Mauritanian embassy in Rabat.
Contact details for Moroccan customs (Douane) are:
Administration des Douanes et Impôts Indirects, Avenue Annakhil, Centre des Affaires, Hay Riad, Rabat Tél : +212 537717800/01 - +212 537579000 Fax : +212 537717814/15 Email : adii@douane.gov.ma Web site: http://www.douane.gov.ma
Coming by car or motorcycle can be a daunting process especially if you are new to Morocco. You have to complete a temporary import form for the customs ("Douane" in French). Sometimes this is done on the ferry (usually in the busy summer months) and at other times at arrival in Tangier. Like at the airport all persons entering Morocco also have to complete an entry/exit card. The Police and the Customs will both search your car - often not together so you need to be patient.
It might be hard to get into Morocco with a commercial vehicle. Camper vans are acceptable (but they must look like a camper van), but other commercial vehicles might get turned around and prevented from travelling onwards. If you want to take a commercial vehicle, and there is more than one person travelling, it may be worthwhile if a French-speaking person travels to any international border with Morocco of your choice and meets with the head of Customs before you bring in a commercial vehicle.
Things have improved considerably for tourists and you are not likely to be bothered too much but you will have to go through all the formalities of bringing your car into Morocco like everyone else. You can only bring your car in for 6 months in any one year. You are not allowed to leave it in Morocco unless you are prepared to pay the tax for the car which can be up to three times the actual cost of the car. This applies even if your car breaks, but if your car is written off, you will need to notify the customs authorities to avoid paying tax on a car as an import. There are strict regulations on bringing a car. For example, customs will not allow someone else to the leave the country with a car entered under someone else's name. Exceptions applied for relatives.
You must have "green card" insurance for your vehicle when driving/riding in Morocco. You can get this insurance from many companies in Europe, or in Morocco at the port in Tangiers. If you are stopped, you must show this insurance to the police. (Even if you aren't stopped by the police, due to a directive not to hassle tourists, you'd better have the insurance in the unlikely event of an accident.) If you do not have insurance from your home country, then local insurance can be purchased at small insurance booths at the port. The insurance companies are reasonably reputable and will pay out if you have an accident. Note that this insurance policy has limitations and you are likely to have much more comprehensive cover from insurers from your own country. Most European insurers will cover Morocco and many include it under their standard level of European cover. It's recommended to contact the above authority, if needed, in either Arabic or French.
Fuel stations are not so common in the countryside so plan ahead and get a good map. As of 2017, contraband fuel is a real problem and it can do various bad things to your car (from corroding the tubes to damaging your engine); the rule of thumb seems to be that Total and Shell are safest but they too sometimes get inferior fuel. It's always best to ask a local or to use gas stations where lots of local cars get their fuel (number at end of number plate defines location, so, e.g. in Tiznit, gas stations with lots of cars that have 37 as area code are a good bet). If you rent a car, ask when renting; also: even when renting don't ignore this issue, modern cars will proactively protect the engine by limiting it to 3,000 rpm.
Most Shell stations accept foreign credit cards, whereas Afriquia most likely don't accept cards at all, as are many other less well known brands.
The total toll for a trip from Marrakesh to Tetouan is a little less than 200 dirham for a family car—buses and trucks pay more.
Motorcyclists will benefit from the vast amount of information in the Morocco Knowledge base for BMW GS'ers in the UK.
Police checkpoints are frequent and seemingly irrational, at times obstructing major road traffic by causing queues of vehicles. At such check points you must either slow down or come to a complete stop, in occasions when a stop is demanded, they do not use the internationally conventional octagonal red sign, instead have the red circle with Arabic قف, French 'halte police' and Spanish 'alto policia' inside, with__out__ English). Either do like the car in front of you does or, if in doubt, just stop until you are signaled to move on.
Police speed checks are very frequent and pervasive, on arterial roads such as N* national road or R* regional roads, expect to see one mobile speed trap every 30 km or so. As of May 2019, most spotted speed traps are mobile, two person under a tree, with one TruCam II Lidar detector, either hand held or on tripods. The convention seems to be flashing high beam to warn oncoming motorists. Penalty is on the spot cash fine with a hand written receipt. Some have mentioned of bribing by putting 100 dirham inside documents when handing over to the policeman. The location of speed traps are most likely on long flat straight stretches of relatively safe road where it is simple to deploy non-tracking Lidar from afar and then flag down offend__ed__ motorists. Speed traps have been placed just before an increase in speed limit to catch people off guard, instead of providing any safety benefits (May 2019, Taroudant). The excess of speed traps seems to indicate they are used to generate revenue instead of providing safety benefits.
Fixed speed cameras are far fewer, mostly on A* autoroutes/motorways.
Although they are generally in good condition, the roads can have deep potholes, even in the largest cities. Pay attention to what the car in front of you does, chances are, the driver knows the road better than you.
Road signs are always to be taken with a grain of salt. While speed limit signs that are similar to worldwide convention are often enforced, speed limit signs that are yellow (indicating roadworks), are most often ignored by everyone. Pedestrians have little traffic sense, do not assume they know anything.
People who live in the countryside use the roads as pedestrians, on bicycles or donkeys. This is especially dangerous at sunset, when you (and they) are blinded by the low sun, and at night, when they appear seemingly out of nowhere in dark djellabahs.
In rural areas animals cross the road with utter disrespect for traffic rules. Unless you want to be confronted with angry villagers because you killed a sheep or experience the impact a camel's body has on your windshield, take care and always watch the roadside.
In the few areas that have dunes, sand can get onto the road and it is sometimes difficult to spot from a distance. And while Morocco is in the subtropics, don't be surprised to encounter snow and ice in the mountains during the winter and early spring.
The city centers of larger cities like Marrakech and Casablanca can be a scary to navigate by car: Lane markers are pure decoration and 2-lane roads are used as 4-lane roads. People use the horn so much that one rarely can say what for in a specific instance. Scooters zigzag through traffic, cutting off cars.
GPS navigation, as of 2019:
Lights don't always work or they are wired up in a funny way (e.g., blinking brake light on the right means "signal right"). Other than that, signaling is considered optional by most drivers. Or they start signaling the moment they change lanes or do the turn. Some cars and trucks are seriously overloaded and might lose part of their cargo en route. Brakes on trucks and buses are, just like the vehicles themselves, sometimes in very bad shape. Police are actively fighting these issues and they got much better over the years, but as of 2017, these warnings are still valid.
Some people ignore traffic rules altogether with impunity because they happen to be important themselves or know someone who is important or because they bribe police. Always expect that someone goes twice as fast as you do. Tailgating is a serious problem, less for the car in front but for oncoming traffic: People will drive 1 m behind a truck, swerving into the other lane just to be able to see whether they can overtake. Whenever you have a truck coming up ahead, get off the accelerator, prepare to brake and get to the far right side of your lane.
In roundabouts, one can count on people in outer lanes cutting off those in inner lanes. Try to stay in the outer lane, if possible. As of 2017, at least in Agadir, police are posted at every roundabout to enforce traffic rules. So far, the effect is negligible.
Drunk driving happens though usually only from late at night until very early morning.