It was an unusually sloppy performance from Djokovic, the Australian Open champion who has 82 career titles compared to one for his unseeded British opponent.
"I don't want to take anything away from his win, but from my side I just felt awful on the court," Djokovic said. "Nothing worked. It's one of those days."
Having won in Melbourne for his 18th major title, Djokovic was 10-0 in 2021 coming into the match. But he faced pressure from the outset as he trailed 3-0 in the first set.
"Should have and could have done much, much better," Djokovic said. "I can't take anything positive away from this match."
He dropped his serve five times in windy conditions.
"Tough to play in these kind of conditions against a guy like Evans who makes you move," Djokovic said. "He's very unpredictable with his shots. He dismantled my game."
Evans, after breaking for a 6-5 lead in the second set, clinched victory on his first match point with a forehand winner that clipped the net.
"It probably hasn't sunk in yet, I couldn't quite believe that last ball went over the net. It nearly didn't," said Evans, who is ranked 33rd. "It's clearly a big win. That's the biggest thing, you've got to believe you can win. Serving it out isn't easy, you've got all these things going through your head."
Nadal broke Dimitrov's serve five times in a lopsided contest that saw the 14th-seeded Bulgarian double-fault three times in his opening service game.
"Sorry for him. He played a bad match, that is the truth," Nadal said. "I was doing the right things, but it is true that today was more his fault than my good tennis."
Evans will play his first Masters quarterfinal against 11th-seeded David Goffin, who upset fifth-seeded Alexander Zverev 6-4, 7-6 (7). Goffin saved all six break points he faced and broke the imposing German's serve once.
In other third-round play, No. 4 Stefanos Tsitsipas advanced 6-3, 6-4 against Cristian Garin and the big-serving Greek will meet Alejandro Davidovich Fokina after he beat wild-card entry Lucas Pouille 6-2, 7-6 (2).
No. 15 Fabio Fognini, the 2019 champion, won 6-2, 7-6 (1) against Filip Krajinovic. The Italian, who convincingly beat a subdued Nadal in the semifinals two years ago, plays Casper Ruud. The unseeded Norwegian won 7-6 (4), 5-7, 7-5 against No. 12 Pablo Carreno Busta.
The clay-court tournament was canceled last year because of the coronavirus.