The defending champion lost the first set 6-2 as the Spaniard made an inspired start.
Djokovic recovered brilliantly and leveled the match with a 6-1 domination in the second.
Ferrer applied pressure in the third set but went down 6-4 after a single break of serve.
The Serb pressed home his advantage with an early break in the fourth set, and finished the job with ruthless efficiency to close the match out 2-6 6-1 6-4 6-2.
Djokovic advances to meet Andy Murray in tomorrow night's final at Flushing Meadows, in the Scot's fifth Grand Slam final appearance.