"But, you know, after an opponent like this, to come back from two breaks down, actually, for me it was nearly impossible".
Though Djokovic came back to win the second set, he lost momentum, bowing out 6-7 (3-7), 6-4, 1-6.
The title defense went up to a soggy start as play got suspended on multiple occasions due to rain showers on Saturday.
Unfazed, Federer reeled off three straight points to close in one hour, 41 minutes.
Federer, who regained the world number one ranking last month, is on a quest to make history in the California desert by winning an unprecedented sixth Indian Wells title.
It was another snag in the return for the 30-year-old Djokovic who admitted he was out of sorts while playing in just his second event of 2018.
House Intel Panel Will Announce End Of Russia Probe Interviews Monday
The Senate Intelligence Committee is preparing to put out recommendations and hold a hearing on election security this month. Republicans are expected to assert that collusion did not occur, according to CNN .
Frenchman Gael Monfils survived a match point before beating big-serving American John Isner 6-7 (5) 7-6 (3) 7-5 in a contest that had only one break.
On Monday, the third round wraps up with Federer back on court against Paris Indoor finalist Filip Krajinovic.
Federer stressed it was always going to be hard for the six-time Australian victor to impress on his return from injury, which is why the 36-year-old was not surprised following Djokovic's struggle in Indian Wells. Daniel sent an out-of-sorts Djokovic tumbling with a hard-fought 7-6, 4-6, 6-1 victory.
On Sunday, the former world No. 1 could not even get past his opening match in Indian Wells, despite another extended break from the game he once dominated and after what he termed "a small medical intervention" on his troublesome right elbow.
"I didn't come here to lose in the first round two and two", he said.
Federer said of the situation: "To me, it's not that surprising".
Chiefs release starting safety Ron Parker, LB Tamba Hali
The new league year has not even begun and the Kansas City Chiefs have already had an interesting offseason. Tamba Hali now enters National Football League free agency as an unrestricted pass rusher.
"Very weird, I just completely lost rhythm".
"And I think that, you know, after that tiebreak, I was just a little bit more solid than him".
Both Djokovic and Edmund were making their first appearances since the Australian Open.
Djokovic took six months off after Wimbledon past year and returned at January's Australian Open, where he lost in the fourth round.
Djokovic had four aces but served poorly overall, finishing with four double faults, and the Serbian made 62 unforced errors in total.
Barcelona coach Ernesto Valverde: Don't write off Real Madrid
Valverde also praised Ousmane Dembele following his performance, which also drew plaudits from team-mate Coutinho . Dembele was Barca's record signing when he arrived and was tasked with filling the shoes of the departed Neymar .