The third-seeded Murray won the first two two sets, lost the middle pair then stormed back for a marathon 7-6 (12-10), 7-5, 2-6, 3-6, 6-2 victory over No. 2 seed Djokovic.
The 4-hour, 54-minute match, played in windy conditions at Arthur Ashe Stadium, gave Murray the first Grand Slam title for a British man since Fred Perry in 1936.
The Scotland native won his first Grand Slam final in five career appearances, earning a prize of $1.9 million.
He also became the first man since John McEnroe in 1980 to win the first two sets, lose the next two and win the fifth to claim a U.S. Open title.
After opening the third set with a break, Murray jumped out to a 3-0 lead. But Djokovic got a break back and pulled to within 2-3, but Murray won the next four games to secure his long-sought first major championship.
"It was incredibly tricky conditions," Murray said. "I don't know how I managed to come through."
Djokovic failed in a bid to become the first man in 63 years to overcome a two-sets-to-love deficit in the U.S. Open final -- only Pancho Gonzales pulled off the feat in 1949.
Benedict Cumberbatch's dramatic reading of R. Kelly lyrics is just what you need
Exploding whale video goes viral on Internet