It is about 560 km, so most travellers take a three-day tour via Aït Benhaddou and the Dades or Todra gorges. There are also overnight buses, or flights to Errachidia, about 130 km from the dunes.
Trips related to this question
Free cancellation · 24h
Merzouga Overnight Desert Camp & Camel Trek
A one-night camel trek and desert-camp stay in the Erg Chebbi dunes at Merzouga — sunset, dinner, music…