Second seed Medvedev, 25, lost his two previous Grand Slam finals but was composed throughout a 6-4 6-4 6-4 win.
The 34-year-old Serb was also chasing a record 21st Grand Slam men’s title.
Victory would have moved him clear of rivals Roger Federer and Rafael Nadal in the battle to finish with the most men’s majors, but it was the potential calendar Grand Slam which Djokovic had said would be the “greatest achievement” of his career.
Djokovic was bidding to become just the sixth player to win a calendar Slam and the first man to do it since Rod Laver in 1969.
Perhaps burdened by the weight of history, Djokovic looked subdued throughout as he made a high number of uncharacteristic errors and also became tearful towards the end.
He also looked way short of his usual physical capabilities.
To put those factors down as the sole reasons for Medvedev’s success would be completely wrong.
The Russian played smartly and confidently, drawing the errors out of his opponent with strong serving, dominating his opponent from the baseline and finishing points with precise winners, as he avenged a straight-set defeat by Djokovic in February’s Australian Open final.
There was a slight wobble as he tried to serve out for the title – three double faults helped Djokovic nick back a break for 5-3 – before Medvedev composed himself to take his third championship point.
After sharing a warm hug with Djokovic at the net, Medvedev broke out in a broad smile before sitting back in his chair to contemplate finally winning the first Grand Slam title which he has long threatened.
“I want to thank my team, those who are here and watching. My parents, my family, my sisters. Some of my friends are here too,” said Medvedev, who dropped only one set in the tournament.
“Thank you guys because it is not an easy journey to win a Slam. I’m really thankful to you for helping me throughout this journey.”
Addressing Medvedev, Djokovic said: “If there is anyone who deserves a Grand Slam title right now, it is you. Well done. There will be many more titles to come, I’m sure.”
Third time lucky for Medvedev
Two years ago, Medvedev cut an emotional figure after the men’s singles final in New York.
It was the Russian’s first Grand Slam final and, after an exhilarating fightback from two sets down, he eventually lost an epic five-setter to Nadal.
Mesmerised by a video montage on the Ashe television screens showing all of Nadal’s achievements – then standing at 19 Grand Slam titles – the Russian later said he wanted to use that as further inspiration in his own quest to land the sport’s biggest prizes.
Finally he has achieved that.
In Melbourne on his second attempt, Medvedev was overwhelmed by the intense pressure from Djokovic and his game broke down.
This time, it was a complete role reversal.
Medvedev broke in the first game of the match and while Djokovic settled down in his service games in the rest of the set, the problem was he could make no impact on the Russian’s serve.
Firing them down with pace and precision meant even the best returner in the men’s game had no answers.
Medvedev only allowed Djokovic to win three receiving points in the opening set, winning 100% of his first-serve points as Djokovic made just 27% of his returns.
Djokovic had lost the first set in his previous four matches – including wins over German fourth seed Alexander Zverev and Italian sixth seed Matteo Berrettini – and had five break opportunities at the start of the second set.
But he was unable to convert any of them as Medvedev rallied to hold both times, leaving Djokovic slapping his thighs in annoyance.
The Russian broke for 3-2 – enough to take the second set – and then raced 4-0 ahead in the third before clinching victory after his brief wobble.
After producing double faults on his first two championship points, Medvedev composed himself to land a first serve on the third.
Djokovic could not return it over the net and world number two Medvedev collapsed to the court in a celebration inspired by football video game Fifa.
‘I’ve never felt like this in New York’ – Djokovic overcome by emotion
While losing the opportunity to create further history will be hard for Djokovic to stomach, there was some comfort in the rousing reception he received from a New York crowd with whom he has not always had the warmest of relationships.
The Arthur Ashe Stadium has been somewhat of a hostile venue for Djokovic over the years, particularly in the 2015 final against Federer when fans were cheering misses from the Serb.
From the start of the final against Medvedev, right through to the moment he walked off court, there was huge backing for the Serbian 20-time Grand Slam champion.
After a comfortable hold for 5-4 in the third set, the crowd roared further support for Djokovic and it led to him becoming emotional in his chair.
Initially he laughed and then thumped his heart as the noise became louder. That led to an overwhelmed Djokovic crying behind his towel on his chair and still tearful as he stood behind the baseline at the start of the next game.
Afterwards, he told the crowd while also welling up: “Even though I haven’t won the match I am the happiest man alive because you guys made me very special on the court.
“You guys touched my soul. I’ve never felt like this in New York. Thank you for your support. I love you.”