World number one and defending champion Roger Federer's Indian Wells opener was marred by rain as the wet weather forced his contest with Federico Delbonis to be rescheduled.
But rain, a rarity in the desert, stopped play at 2-2 in the second set.
However, Daniel bounced back as he won the third set comfortably to clinch the match.
The 7-6 (7-3) 4-6 6-1 loss resulted in a quick exit from a tournament the Serbian has won five times.
The American came into the match after beating reigning Wimbledon champion and world No. 3 Garbine Muguruza of Spain in one of the upsets of the tournament so far, but surrendered too many easy points against her hard-hitting Japanese opponent. Djokovic even admitted that he lacked rhythm in the game.
The two-hour-plus match delayed the start of the evening session on centre court, where top seed Federer finally made his first appearance in the event, up against 67th-ranked Argentine Federico Delbonis.
On his highly-anticipated return to the tour after right elbow surgery, Djokovic looked a shadow of his former self.
Djokovic took six months off after Wimbledon a year ago and returned at January's Australian Open, where he lost in the fourth round.
Djokovic said he felt like it was his "first match" on tour and was unable to explain his opening set stumble or his capitulation in the decider. "Very weird. I mean, I just completely lost rhythm, everything".
"To me, it's not that surprising", Federer said.
World No.3 Marin Cilic of Croatia on Sunday defeated Hungary's Marton Fucsovics 7-5, 6-3 to set up a third-round clash with Germany's Philipp Kohlschreiber, who beat Tim Smyczek of the United States 1-6, 6-4, 6-4. "When you go away from the game for over a two-month period, it starts feeling a little bit that way", the Express quoted Federer as saying.
"I have been sick for over a week and tried everything I could to get better".
He will now play against another American, Jack Sock, who beat Italy's Thomas Fabbiano 6-2, 7-5.