Sixth seed Thiem crashed out just a week after inflicting a first clay-court defeat on Nadal in over a year in Madrid which cost the Spaniard the world number one ranking.
The 24-year-old destroyed his racket in fury as he suffered his first defeat to Italian Fabio Fognini in three meetings, sinking 6-4, 1-6, 6-3 at the Foro Italico.
Nadal later eased through 6-1, 6-0 against Bosnian Damir Dzumhur as he targets an eighth Rome title and first since 2013.
"After a loss in Madrid, it's important to come back strong. And that's what I did today," said Nadal, who received a first-round bye.
The 31-year-old, who claimed the 11th titles of his career at both Monte Carlo and Barcelona, took the first set in 34 minutes, coasting to victory in just an hour.
The 16-time Grand Slam winner next takes on either Canadian Denis Shapovalov, 19, or Robin Haase of the Netherlands.
"Today was a positive day. I don't know how many mistakes I did, but not much," said Nadal.
Djokovic, a four-time winner, is on the comeback trail three months after elbow surgery and eased past Georgia's Nikoloz Basilashvili 6-4, 6-2.
The Serbia will next play Spaniard Albert Ramos Vinolas who needed three sets to get past American eighth seed John Isner 6-7 (5/7), 7-6 (7/2), 7-6 (7/5).
Fognini, ranked 21, next plays Germany's Peter Gojowczyk before a possible quarter-final showdown with top seed Nadal.
"If you compare it to Madrid there were a lot of close matches I could have lost there too. I did have chances," said Thiem.
- Pliskova racket rage -
Former world number one Karolina Pliskova was so angry she put a hole in the umpire's chair with her racket instead of shaking hands after losing to Greece's Maria Sakkari.
Pliskova, the sixth seed, argued lengthily after an overhead shot was incorrectly ruled out and both the line judge and the umpire said they could not find the mark.
The controversial shot came in the third set with the Czech serving at 5-5 (30/30). She could not conceal her fury as she went on to lose the match 3-6, 6-3, 7-5.
Instead of shaking hands with the umpire after the match, Pliskova first put her hand out before beating up the chair.
Earlier, top women's seed Simona Halep needed just under an hour to advance 6-1, 6-0 past Naomi Osaka to avenge her defeat to the Japanese player in Indian Wells.
"It was one of those helpless feelings," conceded 20-year-old Osaka who could be heard saying "I want to cry" courtside.
Halep needed to save four break points in her opening service game for 1-1 but then reeled off 12 in a row.
"I like to slide on the clay and today was easy for me. I'm more relaxed than in Madrid," said 26-year-old Halep.
Halep reached the final in Rome last year and needs to reach the quarter-finals this time to retain her world number one ranking.
She next plays 13th-seeded American Madison Keys, who battled past Croatian Donna Vekic 7-6 (7/2), 7-6 (7/0), for a place in the last eight.
France's Caroline Garcia, a semi-finalist in Madrid last week, eased past Hungary's Timea Babos 6-3, 6-4, and will next face US Open champion Sloane Stephens.