Krajinovic had no answer for Federer's serve or relentless return game and ended up winning just 31 of the match's 93 points.
Djokovic was makings his first appearance since being stunned by Hyeon Chung at the Australian Open. Daniel plays next Argentinean tennis player Leonardo Mayer.
But world number one Federer, who won his own contest with Federico Delbonis, had expected that Djokovic would find it tough getting back into the swing of things on the ATP Tour.
"So I'm on a good run right now, and I try to maintain that, and you only maintain that if you respect every opponent", the 20-time men's singles Grand Slam champion said. Federer, who earned his fifth title at Indian Wells previous year, saved a set point in the second-set tiebreaker and advanced to face Filip Krajinovic yesterday.
But the decision backfired as he peppered the court with 61 unforced errors and totally faded away in the third set in the second round clash that lasted 2 hours 30 minutes. "Very weird. I mean, I just completely lost rhythm, everything".
With two titles at St Petersburg and Doha and a 14-match winning streak, World No. 9 Petra Kvitova was one of the biggest contenders for the women's title.
Playing for a third consecutive day due to weather delays in Indian Wells, the 36-year-old Swiss showed no sign of wear en route a 6-2 6-1 thrashing of the Serbian.
Federer wasted no time in the second set, sailing in the fourth round where he will face Jeremy Chardy.
American Taylor Fritz battled back from a set down to beat Fernando Verdasco 4-6, 6-2, 7-6 (1) - the victory ensured he has now won 11 of 12 final-set tiebreaks. "Now we're in Indian Wells and that's my focus and not what I have achieved in the past".
Yuki Bhambri of India pulled off a surprise when he toppled ninth-seeded Frenchman Lucas Pouille 6-4 6-4. 10th seed and Australian Open semi-finalist Angelique Kerber fought back rain and a set loss to register a 3-6, 6-4, 6-2 win over Ekaterina Makarova.