Daniel was unfazed as he clinched the next three points to take a one-set lead.
Federer returned to stadium court today afternoon and needed an hour to finish off his second round victory 6-3, 7-6 (8/6).
Federer, who had looked slightly off his game in his rain-disrupted third round match against Federico Delbonis, was his dominant self on Monday, winning 89 percent of his first service points while cracking six aces to just one double fault.
While Djokovic was exiting the event, top-seeded Roger Federer finally completed his entrance. It was the former world No.1's first match since returning from an injury, which forced him to undergo a surgery earlier in February.
"You're only really as good as your last match", Federer added. Just struggled also a little bit with (my) health the last couple of weeks.
The Swiss maestro is unbeaten since the start of the season having won both the tournaments he has entered thus far - the Australian Open in January and the Rotterdam Open the following month. "I mean, I had no expectations", said Djokovic.
"I was feeling like he was not loving my slice and I was also mixing in drop shots", said Federer who extended his flawless record this season to 14-0.
The 30-year-old crashed out of the first ATP World Tour Masters 1000 of the calendar year following his defeat at the hands of Taro Daniel. Daniel went up 4-1 in the tiebreak before Djokovic got the minibreak back. "Many times I have looked at the draw and, 'Oh, God, Rafa is my second-round (opponent),' or something". "You don't have pain, but you're still thinking about it".
Daniel, who is ranked 109th in the world, advanced to the third round where he will face Gael Monfils of France who outlasted American John Isner 6-7 (5/7), 7-6 (7/3), 7-5.
Next up for the 23rd seed is Cuevas, who was leading 3-6 6-4 4-2 when Thiem retired hurt.
The win sets up a third-round showdown with Spaniard David Ferrer, who defeated Tennys Sandgren of the USA 6-2, 7-6 (7-3).