Murray became Britain's first major champion since Fred Perry claimed his third American title in 1936, the year the Spanish Civil War started and Franklin D. Roosevelt was re-elected US president.
In a roller-coaster final, which witnessed a 54-shot rally, numerous 30-stroke exchanges, as well as a record-setting tie-breaker, the 25-year-old Murray held his nerve in a knife-edge final set.
The Olympic champion led 3-0 in the decider, dropped serve but broke again for 5-2 when Djokovic called a medical time-out.
But Murray wasn't to be denied, taking the historic crown when Djokovic went long with a forehand on a second match point in what was, at four hours and 54 minutes, the second-longest US Open final of all time.
"It was incredibly tricky conditions and in the third and fourth sets, it was really tough because Novak is really strong and fights all the way," said Murray.
"It was close to five hours. I have always had tough matches with him."
Murray paid tribute to coach Ivan Lendl, who lost three finals in New York from 1982-1984 until clinching three titles in a row from 1985-1987.
"He was one of the greatest," Murray said. "He has helped me through the tough times as have all of my team. It's the best feeling for me, I've had an unbelievable summer."
Djokovic admitted Murray was a worthy winner.
"It wasn't to be and I want to congratulate Andy on a first Grand Slam. He deserves it," said Djokovic.
"I tried my best and I gave it my all. It was another tremendous match and I am proud to have been part of it. It went to the last moment."
Murray had lost all of his four previous Grand Slam finals -- to Roger Federer at the US Open in 2008, the 2010 Australian Open and this year's Wimbledon, as well as to Djokovic in Australia in 2011.
But cheered on by fellow Scots Sir Sean Connery and Manchester United boss Sir Alex Ferguson, he survived a thrilling fightback by Djokovic, a five-time major winner who had defeated Murray in an epic five-setter in the Australian Open semi-finals in January.
It was Murray's 24th career title and his win denied Djokovic the chance to claim the biggest pay-day in the history of the sport, $2.9 million for winning the trophy as well as having the best record in the lead-up tournaments.
Djokovic had spent five hours fewer than Murray on the court in reaching his fourth US Open final, but fitness wasn't an issue in the opening exchanges.
It was a battle to see who could master the vicious wind that suddenly whipped up inside Arthur Ashe Stadium as play got underway.
Both players were broken in the first two games before Murray nipped ahead 3-2 with a break courtesy of Djokovic's third double fault in just three service games.
Murray went to 4-2 despite Djokovic coming out on top in a 54-shot rally.
The Serb retrieved the break for 4-4 before serving two love games going into the tie-break.
The 24-minute tie-breaker, a record for a men's championship match at the tournament, featured a 30-shot rally and a 33-shot exchange before Murray took it on a sixth set point after a marathon 87-minute set.
Murray, sensing his place in the history books, raced to a 4-0 and 5-2 lead in the second set before Australian Open winner Djokovic, a five-time Grand Slam champion, clawed back to 5-5.
The Scot held for 6-5 and carved out two set points when the Serb sent a wild overhead wide.
Djokovic saved one but handed the second set to his opponent with a misguided forehand which also sailed away on the breeze.
But the world number two wasn't going down fighting.
A year ago, he came back from two sets and two match points down to beat Federer in the semi-finals and, on Monday, he took the third set 6-2 on the back of a double-break.
Comfortably on top after such a sudden and unexpected shift in momentum, Djokovic broke for 1-0 in the fourth set.
He then survived a break point in the fourth game as well as a time violation handed down by umpire Jake Garner to hold for 3-1.
Murray wilted under the barrage as the once-uncertain Djokovic became a sure-footed shot-maker, levelling the final by taking the fourth set 6-3.