The second-seeded Nadal, showing desire but displaying a rusty game, was upset by German qualifier Michael Berrer 1-6, 6-3, 6-4 in the first round.
This was Nadal's first match since losing in the Basel quarterfinals to 17-year-old Borna Coric of Croatia in October. The Spaniard spent much of the autumn suffering from appendicitis and underwent an appendectomy on Nov. 3.
''These things happen after long time without being on the road, being on rhthym, being in competition,'' Nadal said. ''I was playing with more nerves because after long time (away) I wanted to win.
''When you are back from an injury, that takes time.''
Nadal was also sidelined for three months with a right wrist injury after Wimbledon. He briefly returned to the game at Beijing in late September where he reached the quarterfinals.
The following week in Shanghai he lost in the opening round to compatriot Feliciano Lopez.
Nadal had three break points on Berrer's serve in the final game, but couldn't convert on those opportunities to draw the third set score even to 5-5.
Despite the disappointing loss, Nadal expects to get back on track once he starts playing more matches.
''I'm going to work hard to try to make it less tough as possible,'' Nadal said. ''My motivation and my hunger to keep doing things well is still the same.
''So I am sure that I'm gonna come back to my best. I hope to be soon.''
The 127th-ranked Berrer broke Nadal to go ahead 3-1 in the second set, and then in the first game of the third set.
Berrer had never before beaten a top five ranked player. The 34-year-old father of two has already announced he's retiring at the end of the year.
''It's really unbelievable,'' Berrer told the crowd after his win. ''It's my last season so I'm just going for it. Why not?''
Nadal had won their previous two matches with ease, never dropping more than three games in either match.
Top-ranked Djokovic started off his 2015 season with a 6-2, 6-1 win in a 59-minute match against fellow Serbian Dusan Lajovic.
Djokovic put 72 percent of his first serve in play and was successful on five of six break point opportunities.
Djokovic withdrew from the Abu Dhabi exhibition final last week with the flu, but showed no lingering signs of illness against Lajovic.
''I thought it was a very good performance under the circumstances that I was in for the last couple of days,'' Djokovic said. ''I didn't know how I will feel.''
Djokovic is making his first career appearance at the Doha tournament. Historically, he doesn't play a sanctioned tournament the first week of the year.
Third-seeded Tomas Berdych of the Czech Republic also advanced to the second round with a 6-1, 6-4 win over Denis Istomin of Uzbekistan in 62 minutes.
Sergiy Stakhovsky of Ukraine gave himself a 29th birthday present in a 6-1, 6-1 first round win over Qatari wildcard recipient Jabor Mohammed Ali Mutawa.