Victory for Mensik meant he denied the former number one, Djokovic, his bid for a milestone 100th.
The 54th-ranked Mensik faced tough odds in only his second ATP final but harnessed his best weapon to subdue the 24-time major winner with 14 aces.
He collapsed onto the court, overcome with emotion, after sealing it with an unreturnable serve.
The oldest ever to reach a Masters 1000 final, 37-year-old Djokovic had hoped to join Jimmy Connors (109) and Roger Federer (103) as the only three men in the Open Era with 100 or more titles.
He however ran out of steam in the end.
“When I was young I started to play tennis because of you,” Mensik said to his opponent at the trophy ceremony.
“There is no harder task for a tennis player than to beat you in the finals of a tournament.”
Djokovic arrived on the court after several hours of rain delays with swelling near his right eye.
He appeared off-kilter as he handed Mensik a break with a clumsy shot out of bounds in the second game.
He slipped and fell in the fifth game, taking his time to get back up off the court.
This was as his legions of devoted fans in Hard Rock Stadium urged him on, and applied eye drops to his afflicted eye during the changeover.
The Serb levelled it in the seventh but boiled over with frustration as Mensik got off to a 5-0 head start in the tiebreak.
He fumed at his box, where his former rival-turned-coach Andy Murray sat stone-faced.
The Czech held his nerve, meanwhile, and pumped his fist with satisfaction as he clinched the set with an overhead smash.
The two players battled toe-to-toe in a thrilling second set, where Mensik used his speed to his advantage to neutralise Djokovic’s fine drop shots at the net.
Djokovic had his veteran survival instincts on display as he fended off two break points in the fifth game.
But he gradually showed the wear-and-tear of the match before collapsing from exhaustion after a 21-shot rally in the tiebreak.
“It hurts me to admit it but you were better,” said Djokovic, who had previously invited Mensik to train with him after the then-16-year-old reached the Australian Open juniors final in 2022.
“In the clutch moments, you delivered the goods.”
The win capped a dream run through the tournament for Mensik, who upset third seed Taylor Fritz en route to the final.
“To be honest, I don’t know what to say. It feels incredible, obviously,” he said in on-court remarks.
The victory was made all the more sweet as Mensik said he nearly dropped out of the tournament an hour before his first match due to knee pain.
He gave his physio full credit for keeping his hopes alive.
“I came for treatment, needed a miracle,” said Mensik. “And because of him I stepped on the court and because of him I’m standing here.”(Reuters/NAN)