Toyota driver Tanak had been leading the event by 41.9s from Ogier and looked in total control as he headed towards a fourth consecutive WRC rally win, despite a hefty off in shakedown before the event.
But on the Sweet Lamb Hafren stage, SS16, the Estonian pulled off to the side of the road.
After investigating and then removing his helmet, Tanak then drove the car up an escape road before exiting the cockpit again.
French rider Cherpin dies from injuries in Dakar rally crash
15/01/2021 AT 09:23
Live WRC pictures showed him laying on the floor as co-driver Martin Jarveoja attempted to console him.
The car appeared undamaged and Toyota Gazoo Racing Tommi Makinen said the team were unsure of the issue, but it could relate to the radiator, which would explain Tanak's decision to stop and preserve the car with five championship points on offer for the power stage tomorrow.
Tanak's retirement means the top four are now split by under 15 seconds, with Ogier leading the remaining Toyotas of Esapekka Lappi and Jari-Matti Latvala, and the top Citroen of Craig Breen.
WRC title leader Thierry Neuville - who entered the event 13 points ahead of Tanak - had been second to the Toyota driver on Friday morning but made a mistake on SS11, dropping him down to ninth until Tanak's retirement.
If the result remains as it is now, Ogier would lie just 2 points behind Neuville, with Tanak a further 15 behind.
Indian rider Santosh flown to hospital after Dakar Rally crash
06/01/2021 AT 19:16
Ogier set for seventh title after Evans crashes in Monza
05/12/2020 AT 15:18