The loss snapped a 16-match winning streak in the tournament for the ninth-seeded Serb, who had been eliminated in the second round at Indian Wells but said before the match his right elbow was pain free for the first time in a long while.
He had won the tournament in 2014, 2015 and 2016 but missed last year’s event with the elbow injury.
The defeat also ended a streak of 21 consecutive victories over players from France for the former world number one.
Paire, who had lost his only other meeting with Djokovic, delivered nine aces to only two for the Serb and won 71 percent of his service points.
Meanwhile, second seeded Croatian Marin Cilic moved into the third round with a 7-5 6-3 triumph over Frenchman Pierre-Hugues Herbert.
But the early upsets did not end with Djokovic’s loss.
David Goffin was unsuccessful in his return from an eye injury, the seventh seeded Belgian falling to Portugal’s Joao Sousa 6-0 6-1.
American wild card Michael Mmoh produced another surprise, upsetting 12th seeded Roberto Bautista Agut 7-6(4) 2-6 6-4 in two hours, 43 minutes. Mmoh got the victory despite losing eight consecutive games after being up a set and 2-0.
Diego Schwartzman and Milos Raonic also moved on.
Argentine Schwartzman, the 13th seed, dominated Chilean Nicolas Jarry 6-3 6-1 while the 20th seeded Raonic, a 2016 Wimbledon finalist, cruised into the third round with a 6-3 6-3 victory over Swede Mikael Ymer that took 66 minutes.
The Canadian fired off 16 aces to only four for Ymer and won 78 percent of his first serve points.