Murray captured his 26th career tour title, and second of the year having taken the Brisbane crown, after a grueling two hours and 45 minutes.
“Both of us fought hard,” Murray said. “Both of us were struggling physically at the end. I was lucky to come through.”
It was the second Miami title for Murray, who won the title in 2009 but lost last year’s final to Novak Djokovic.
Murray will rise to World No 2, bumping his way ahead of Roger Federer, while Ferrer will move past Rafael Nadal to become fourth.
Spotted: Sridevi's daughter Jhanvi Kapoor in Bandra
Photos: Kajol, Sridevi, Raveena Tandon at Mumbai airport
Photos: Akshay Kumar, Anushka Sharma, Ranveer Singh at Umang 2017
Photos: Sunny Leone, Shah Rukh Khan on Salman Khan's 'Bigg Boss 10'
Birth anniversary special: Remembering Subhas Chandra Bose