The Scot had to endure a major scare in the second set when he lost four straight games to go from 3-0 up to 4-3 down before regrouping to seal a 6-4, 7-5 success over the top seed in just under two hours.
A single early break earned third seed Murray the first set and his powerful serving and fierce ground strokes had him soon in control of the second.
Ferrer reversed the tide in impressive fashion, but his opponent showed plenty of grit, and no little skill, to stop the rot.
Murray, pictured, went into the clash in eighth place in the Race to London standings, with ninth place now enough for a place at the O2 Arena following Rafael Nadal’s withdrawal.
Ferrer, in ninth, could have gone ahead of Murray with victory though, and with Milos Raonic and Grigor Dimitrov also firmly in the hunt, the heat was on the 2013 Wimbledon champion, especially given his tough draw at the one remaining event, the Paris Masters. He could face Dimitrov in the last 16 and Novak Djokovic in the last eight in the French capital.
This was Murray and Ferrer’s third meeting in three weeks, the British No.1 having beaten his rival in the final in Vienna after losing to the Spaniard in Shanghai.
He got off to the best possible start against the home favourite, breaking in the opening game as Ferrer twice double-faulted.
Murray was firmly up and running as he then held to love and retained the break advantage before fighting back from break point down when serving for the set to clinch it 6-4.
He gained an early foothold in the second set too, breaking in the first game again and consolidating for a 2-0 lead to leave his opponent up against it. He broke again, only to hand the break straight back, surrendering a 30-15 advantage with a couple of errors.
Ferrer reduced the deficit to one game with his first service hold of the set and had Murray really sweating when he broke again to level at 3-3.
Ferrer moved 4-3 in front and Murray had to save break point to level at 4-4 and stem the tide.
A brilliant cross-court return put Ferrer one game away from the set, but Murray kept his cool to make it 5-5 and then came through a brutal game to break for a 6-5 lead. And he fought back from 40-15 down to seal a crucial victory on his second match point.
n An in-form Simona Halep stands between Serena Williams and a third successive WTA Finals crown after both players booked their place in today’s title decider.
Williams fought back from a set down and a break in the third set against Caroline Wozniacki to win 2-6, 6-3, 7-6 (8/6) in two hours and 13 minutes, while Romanian Halep needed just 67 minutes to despatch Agnieszka Radwanska 6-2, 6-2.