Nadal, a 10-time champion in Monaco, needs to win the tournament to stay top of the world rankings, or he will be replaced by Roger Federer. It certainly won't be a cakewalk for the 12-time Grand Slam champion.
The Serbian reached the quarter-finals previous year before also losing to Thiem but is a former champion at Roland Garros, having triumphed there in 2016 to complete his career Grand Slam.
Austrian Thiem is one of the best claycourt players on tour, having reached the French Open semi-finals in each of the last two seasons, and he was impressed by his vanquished opponent's performances in Monaco.
Nadal's victory could have been even more efficient but he surprisingly dropped his serve in the seventh game of the first set.
He took the first two games in quickfire time, before breaking again to lead 4-1 with the help of a raking crosscourt forehand.
It was Thiem's second straight win over Djokovic after his stunner at the French a year ago.
Thiem, a two-time French Open semi-finalist, was the better player for much of his match against Djokovic and won 6-7 (2/7), 6-2, 6-3.
And then Nadal marched onto the court he has owned for so long and produced a typically-smooth performance in beating Aljaz Bedene of Slovenia 6-1, 6-3, the first step on what he hopes will be the path to a record 11th Monte Carlo title.
Thiem believes Nadal is the only player that can stop him from winning many more clay tournaments.
"It's the ultimate challenge for everybody, to play against him", he explained after today's win. "I was predisposed to some risk and I was unable to play with that amount of pain". But he came back yesterday, I think match point down, and had a tough one himself.
Djokovic came through a tight first set in a tie-break and moved a break clear in the second, before late drama as he missed nine chances to close out the match.
Gasquet will next face third-seeded German Alexander Zverev, who battled past fellow countryman Jan-Lennard Struff 6-4, 4-6, 6-4.
The top-ranked Nadal has beaten big-hitting Russian Karen Khachanov 6-3 6-2 to reach the quarterfinals, clinching victory with a clinical smash at the net.
A year ago semi-finalist Lukas Powell was defeated by Misha Zvereva of Germany 2-6, 6-1, 7-6, while Germany's Eleven Zwerev emerged from a slow start to beat Luxembourg's Giles 4-6, 6-3, 6-2.
Roberto Bautista Agut was not happy after dropping his serve in the second set against David Goffin and he hit a ball into the ground in frustration, unknowingly sending it into the direction of a ball boy.
World number three Marin Cilic booked a last-16 spot with a 6-3 7-6 (4) win victory over Spanish veteran Fernando Verdasco.